Classify audio clips into predefined categories such as speech emotion, sound detection, and music genres
Basic usage
Send an audio file to a model for classification
import Bytez from 'bytez.js';// insert your keyconst sdk = new Bytez('BYTEZ_KEY');// choose your modelconst model = sdk.model('aaraki/wav2vec2-base-finetuned-ks');// provide the model with inputconst input = { "url": "https://huggingface.co/datasets/huggingfacejs/tasks/resolve/main/audio-classification/audio.wav"};// send to the modelconst { error, output } = await model.run(input);// observe the outputconsole.log({ error, output });
from bytez import Bytez# insert your keysdk = Bytez("BYTEZ_KEY")# choose your modelmodel = sdk.model("aaraki/wav2vec2-base-finetuned-ks")# provide the model with inputinput = { "url": "https://huggingface.co/datasets/huggingfacejs/tasks/resolve/main/audio-classification/audio.wav"}# send to the modelresult = model.run(input)# observe the outputprint({"error": result.error, "output": result.output})