# TEST MODEL | |
from transformers import pipeline | |
classifier = pipeline(task="zero-shot-audio-classification", model="mskov/whisper-small-esc50") | |
# classifier = pipeline(model="mskov/roberta-base-toxicity") | |
audio = "./candy-bar-chewing.wav" | |
classifier(audio, candidate_labels=["Sound of a dog", "Sound of vaccum cleaner", "chewing", "sneezing"]) | |
predicted_label = result[0]["label"] | |
print(f"Predicted label: {predicted_label}") |