A HuggingFace pipeline for emotion classification from audio using SpeechBrain ECAPA embeddings and SVM.
You can install the package directly from GitHub:
pip install git+https://github.com/griko/voice-emotion-classification.git
from voice_emotion_classification import EmotionClassificationPipeline
# Load the pipeline
classifier = EmotionClassificationPipeline.from_pretrained(
"griko/emotion_7_cls_svm_ecapa_ravdess"
)
# Single file prediction
result = classifier("path/to/audio.wav")
print(result) # ["angry"] or ["disgust"] or ["fearful"] or ["happy"] or ["neutral/calm"] or ["sad"] or ["surprised"]
# Batch prediction
results = classifier(["audio1.wav", "audio2.wav"])
print(results) # ["angry", "disgust"]
If you use this model in your research, please cite:
@misc{koushnir2025vanpyvoiceanalysisframework,
title={VANPY: Voice Analysis Framework},
author={Gregory Koushnir and Michael Fire and Galit Fuhrmann Alpert and Dima Kagan},
year={2025},
eprint={2502.17579},
archivePrefix={arXiv},
primaryClass={cs.SD},
url={https://arxiv.org/abs/2502.17579},
}
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
1 commits
Python
100.0%
A HuggingFace pipeline for emotion classification from audio using SpeechBrain ECAPA embeddings and SVM.
You can install the package directly from GitHub:
pip install git+https://github.com/griko/voice-emotion-classification.git
from voice_emotion_classification import EmotionClassificationPipeline
# Load the pipeline
classifier = EmotionClassificationPipeline.from_pretrained(
"griko/emotion_7_cls_svm_ecapa_ravdess"
)
# Single file prediction
result = classifier("path/to/audio.wav")
print(result) # ["angry"] or ["disgust"] or ["fearful"] or ["happy"] or ["neutral/calm"] or ["sad"] or ["surprised"]
# Batch prediction
results = classifier(["audio1.wav", "audio2.wav"])
print(results) # ["angry", "disgust"]
If you use this model in your research, please cite:
@misc{koushnir2025vanpyvoiceanalysisframework,
title={VANPY: Voice Analysis Framework},
author={Gregory Koushnir and Michael Fire and Galit Fuhrmann Alpert and Dima Kagan},
year={2025},
eprint={2502.17579},
archivePrefix={arXiv},
primaryClass={cs.SD},
url={https://arxiv.org/abs/2502.17579},
}
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
1 commits
Python
100.0%