gender cls svm ecapa voxceleb
Overview
This model is a specialized gender classification tool leveraging ECAPA-TDNN embeddings trained on the VoxCeleb dataset. Unlike general-purpose audio models, this SVM-based classifier is optimized for binary gender identification from speech signals, offering a lightweight alternative for developers who need high-precision voice attribute tagging without the overhead of a full LLM. It is particularly suited for preprocessing pipelines in voice assistants, call center analytics, or user profiling systems. Integration is straightforward for those already using PyTorch or Scikit-learn ecosystems, providing a stable, deterministic output compared to probabilistic neural networks.
Highlights
- Optimized for binary gender classification from speech
- Utilizes robust ECAPA-TDNN embeddings for high accuracy
- Trained on diverse VoxCeleb voice datasets
- Lightweight SVM architecture ensures low latency inference
- Permissive Apache-2.0 license for commercial deployment
Usage
Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("griko/gender_cls_svm_ecapa_voxceleb")
tokenizer = AutoTokenizer.from_pretrained("griko/gender_cls_svm_ecapa_voxceleb")
Hugging Face Download
We recommend downloading the model via the Hugging Face CLI or Hub SDK.
Guidance:Before downloading, install huggingface_hub with:
Guidance
pip install -U huggingface_hub
CLI Download
Download the full repository
Download the full repository
huggingface-cli download griko/gender_cls_svm_ecapa_voxceleb
Download a single file to a local folder (e.g. config.json into ./dir)
Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download griko/gender_cls_svm_ecapa_voxceleb config.json --local-dir ./dir
See the official docs for more CLI options
SDK Download
SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('griko/gender_cls_svm_ecapa_voxceleb')
Git Download
Make sure git-lfs is installed first
Git Download
git lfs install
git clone https://huggingface.co/griko/gender_cls_svm_ecapa_voxceleb
To skip LFS large-file downloads, use:
Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/griko/gender_cls_svm_ecapa_voxceleb
Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.
PyTorch / Transformers Usage
Install Transformers
Install Transformers
pip install -U transformers torch
Load the model and run inference
Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('griko/gender_cls_svm_ecapa_voxceleb')
tokenizer = AutoTokenizer.from_pretrained('griko/gender_cls_svm_ecapa_voxceleb')
Full Documentation
来源: HuggingFace
---
language: multilingual
license: apache-2.0
datasets:
- voxceleb2
libraries:
- speechbrain
tags:
- gender-classification
- speaker-characteristics
- speaker-recognition
- audio-classification
- voice-analysis
---
Gender Classification Model
This model combines the SpeechBrain ECAPA-TDNN speaker embedding model with an SVM classifier to predict speaker gender from audio input. The model was trained and evaluated on the VoxCeleb2, Mozilla Common Voice v10.0, and TIMIT datasets
Model Details
- Input: Audio file (will be converted to 16kHz, mono, single channel)
- Output: Gender prediction ("male" or "female")
- Speaker embedding: 192-dimensional ECAPA-TDNN embedding from SpeechBrain
- Classifier: Support Vector Machine optimized through Optuna (200 trials)
- Performance:
- VoxCeleb2 test set: 98.9% accuracy, 0.9885 F1-score
- Mozilla Common Voice v10.0 English validated test set: 92.3% accuracy
- TIMIT test set: 99.6% accuracy
Training Data
The model was trained on VoxCeleb2 dataset:
- Training set: 1,691 speakers (845 females, 846 males)
- Validation set: 785 speakers (396 females, 389 males)
- Test set: 1,647 speakers (828 females, 819 males)
- No speaker overlap between sets
- Audio preprocessing:
- Converted to WAV format, single channel, 16kHz sampling rate, 256 kp/s bitrate
- Applied SileroVAD for voice activity detection, taking the first voiced segment
Installation
You can install the package directly from GitHub:
``
bash
pip install git+https://github.com/griko/voice-gender-classification.git
`
Usage
`python
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"]
`
Limitations
- Model was trained on celebrity voices from YouTube interviews
- Performance may vary on different audio qualities or recording conditions
- Designed for binary gender classification only
Citation
If you use this model in your research, please cite:
`bibtex
@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},
}
``