Views
No views yet
anger, surprise, happiness, sadness, neutral, fearpip install torch torchaudio speechbrain1from speechbrain.pretrained import EncoderClassifier
2
3classifier = EncoderClassifier.from_hparams(
4 source="mobina1380/speechbrain-persian-ser",
5 savedir="tmp_cache",
6)
7
8# Classify a WAV file
9emotion = classifier.classify_file("your_audio.wav")
10print("Predicted emotion:", emotion)from_hparams.README.md
hyperparams.yaml
embedding_model.ckpt
classifier.ckpt
normalizer.ckpt
label_encoder.txt