A Community-Built wav2vec2 Model Quietly Hit 1M Downloads Tagging Speaker Gender
A fine-tuned wav2vec2 model for binary gender recognition from audio has quietly crossed a million downloads with a near-perfect 0.9993 F1 score.
ProTakeaways
- Community wav2vec2 gender classifier passes ~1M downloads on Hugging Face.
- Reports 0.9993 F1 and 0.0061 loss on Librispeech-clean-100 eval split.
- Fine-tuned from Meta's XLS-R 300M, pretrained on 436k hours of multilingual speech.
- Trained for a single epoch with LR 3e-5 and effective batch size 16.
- Apache 2.0 licensed, Safetensors, drops into Transformers
pipeline("audio-classification"). - Best on clean English audiobook speech; degrades on noise, children, non-English audio.
A niche audio classifier has quietly become one of the most downloaded speech models on Hugging Face. The wav2vec2-large-xlsr-53-gender-recognition-librispeech checkpoint, built by community developer alefiury, has crossed roughly a million total downloads with only 48 likes, a ratio that suggests it is quietly powering a lot of production pipelines that need a fast, cheap way to tag speaker gender from raw audio.
The model does one job: take a waveform sampled at 16 kHz and output a binary label, female or male. It is a fine-tune of facebook/wav2vec2-xls-r-300m on Librispeech-clean-100, and on the held-out split it reports a loss of 0.0061 and an F1 of 0.9993. That translates to near-perfect classification on in-domain audiobook speech.
Under the hood
The backbone is Meta's XLS-R, a self-supervised speech encoder that punches well above its weight for downstream tasks. XLS-R is pretrained on 436k hours of unlabeled speech, including VoxPopuli, MLS, CommonVoice, BABEL, and VoxLingua107, using the wav2vec 2.0 objective across 128 languages. The 300M parameter variant serves as the feature extractor, with a small classification head trained on top for the two-class output.
Because the backbone already understands acoustic structure across languages, the fine-tune barely has to work. Librispeech-clean-100 was split 70/10/20 for training, validation, and testing. Training ran for a single epoch with modest hyperparameters:
- Learning rate: 3e-5, linear scheduler with 10% warmup
- Effective batch size: 16 (batch of 4 with gradient accumulation of 4)
- Optimizer: Adam, betas (0.9, 0.999)
- Mixed precision: native AMP
- Total steps: 1,248
One epoch, one GPU-scale run, and the resulting model converges to sub-1% error on the eval set.
Dropping it into a pipeline
Usage is a two-line affair with the Transformers pipeline API, which makes it attractive for prototyping and for embedding into larger speech stacks:
from transformers import pipeline
pipe = pipeline("audio-classification",
model="alefiury/wav2vec2-large-xlsr-53-gender-recognition-librispeech")
result = pipe("sample.wav")
The model card also ships a full inference script with a CustomDataset, a collator, and a predict loop that pads or truncates audio to 5 seconds at 16 kHz and runs softmax over the two logits. Weights are provided in Safetensors (F32, roughly 0.3B parameters), the license is Apache 2.0, and it can be self-hosted anywhere PyTorch runs. There is no hosted inference provider attached, so cost is whatever your own GPU or CPU inference costs.
Where it shines and where it breaks
Read the headline F1 with the training data in mind. Librispeech-clean-100 is derived from audiobook recordings: clean, single-speaker, mostly North American English, adult voices, minimal background noise. In that distribution, the model is essentially solved. Outside of it, things get murkier. Expect degradation on:
- Noisy or far-field audio, phone calls, and low bitrate codecs
- Children's voices, which were not represented in the training split
- Non-English speech, despite the multilingual pretraining of XLS-R
- Short clips under a second or heavily overlapping speakers
The label set is hardcoded to female and male, a modeling choice inherited from Librispeech metadata rather than a claim about identity. Any application that needs finer categories, non-binary labels, or a confidence-aware unknown class will need a different head or a different dataset.
Why a million downloads for a two-class model
Gender is a common metadata feature in downstream speech systems, and there are surprisingly few off-the-shelf open models that do just this task well. The practical use cases driving the download count look like:
- Voice cloning and TTS pipelines that need to route audio to gender-conditioned models
- Dataset curation, balancing, and demographic auditing for ASR training corpora
- Call-center analytics and conversational AI routing
- Preprocessing for diarization systems that use gender as a coarse speaker prior
The community has picked up on it. The model card lists more than a dozen Hugging Face Spaces built around it, plus two downstream fine-tunes and a quantized variant. For anyone who needs a drop-in gender tag in a speech pipeline and does not want to train from scratch, this is the path of least resistance, with the caveat that you should validate it on your own audio before trusting the 0.9993 number.