README.md
2.6 KB · 84 lines · markdown Raw
1 ---
2 language: multilingual
3 license: apache-2.0
4 datasets:
5 - voxceleb2
6 libraries:
7 - speechbrain
8 tags:
9 - gender-classification
10 - speaker-characteristics
11 - speaker-recognition
12 - audio-classification
13 - voice-analysis
14 ---
15
16 # Gender Classification Model
17
18 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
19
20 ## Model Details
21 - Input: Audio file (will be converted to 16kHz, mono, single channel)
22 - Output: Gender prediction ("male" or "female")
23 - Speaker embedding: 192-dimensional ECAPA-TDNN embedding from SpeechBrain
24 - Classifier: Support Vector Machine optimized through Optuna (200 trials)
25 - Performance:
26 - VoxCeleb2 test set: 98.9% accuracy, 0.9885 F1-score
27 - Mozilla Common Voice v10.0 English validated test set: 92.3% accuracy
28 - TIMIT test set: 99.6% accuracy
29
30 ## Training Data
31 The model was trained on VoxCeleb2 dataset:
32 - Training set: 1,691 speakers (845 females, 846 males)
33 - Validation set: 785 speakers (396 females, 389 males)
34 - Test set: 1,647 speakers (828 females, 819 males)
35 - No speaker overlap between sets
36 - Audio preprocessing:
37 - Converted to WAV format, single channel, 16kHz sampling rate, 256 kp/s bitrate
38 - Applied SileroVAD for voice activity detection, taking the first voiced segment
39
40 ## Installation
41
42 You can install the package directly from GitHub:
43
44 ```bash
45 pip install git+https://github.com/griko/voice-gender-classification.git
46 ```
47
48 ## Usage
49
50 ```python
51 from voice_gender_classification import GenderClassificationPipeline
52
53 # Load the pipeline
54 classifier = GenderClassificationPipeline.from_pretrained(
55 "griko/gender_cls_svm_ecapa_voxceleb"
56 )
57
58 # Single file prediction
59 result = classifier("path/to/audio.wav")
60 print(result) # ["female"] or ["male"]
61
62 # Batch prediction
63 results = classifier(["audio1.wav", "audio2.wav"])
64 print(results) # ["female", "male", "female"]
65 ```
66
67 ## Limitations
68 - Model was trained on celebrity voices from YouTube interviews
69 - Performance may vary on different audio qualities or recording conditions
70 - Designed for binary gender classification only
71
72 ## Citation
73 If you use this model in your research, please cite:
74 ```bibtex
75 @misc{koushnir2025vanpyvoiceanalysisframework,
76 title={VANPY: Voice Analysis Framework},
77 author={Gregory Koushnir and Michael Fire and Galit Fuhrmann Alpert and Dima Kagan},
78 year={2025},
79 eprint={2502.17579},
80 archivePrefix={arXiv},
81 primaryClass={cs.SD},
82 url={https://arxiv.org/abs/2502.17579},
83 }
84 ```