A HuggingFace pipeline for gender 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-gender-classification.git
from voice_gender_classification import GenderClassificationPipeline
# Load the pipeline
classifier = GenderClassificationPipeline.from_pretrained(
"griko/gender_cls_svm_ecapa_voxceleb"
)
# Single file prediction
result = classifier("path/to/audio.wav")
print(result) # ["female"] or ["male"]
# Batch prediction
results = classifier(["audio1.wav", "audio2.wav"])
print(results) # ["female", "male", "female"]
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.
3 commits
Python
100.0%
A HuggingFace pipeline for gender 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-gender-classification.git
from voice_gender_classification import GenderClassificationPipeline
# Load the pipeline
classifier = GenderClassificationPipeline.from_pretrained(
"griko/gender_cls_svm_ecapa_voxceleb"
)
# Single file prediction
result = classifier("path/to/audio.wav")
print(result) # ["female"] or ["male"]
# Batch prediction
results = classifier(["audio1.wav", "audio2.wav"])
print(results) # ["female", "male", "female"]
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.
3 commits
Python
100.0%