Basic usage
Basic usage
Send an audio file to a model for classification
Copy
import Bytez from 'bytez.js';
// insert your key
const sdk = new Bytez('BYTEZ_KEY');
// choose your model
const model = sdk.model('aaraki/wav2vec2-base-finetuned-ks');
// provide the model with input
const input = {
"url": "https://huggingface.co/datasets/huggingfacejs/tasks/resolve/main/audio-classification/audio.wav"
};
// send to the model
const { error, output } = await model.run(input);
// observe the output
console.log({ error, output });