FlaxSpeaker: cn_ecapa_tdnn_small_arcface (ecapa_tdnn - small)
Disclaimer & Open-Source Reproduction Notice
This is not an officially supported Google product.
This model checkpoint and the accompanying FlaxSpeaker library are an independent, clean-room open-source reproduction in JAX/Flax of speaker recognition algorithms published in:
- GE2E: Generalized End-to-End Loss for Speaker Verification (arXiv:1710.10467)
- Dr-Vectors: Decision Residual Networks and an Improved Loss for Speaker Recognition (arXiv:2104.01989)
- Conformer-ATP: Attentive Temporal Pooling for Conformer-based Streaming Language Identification in Long-form Speech (arXiv:2202.12163)
- PFAS: Parameter-Free Attentive Scoring for Speaker Verification (arXiv:2203.05642v3)
The experiments in those original papers were conducted using Google's proprietary internal infrastructure and internal datasets, not this open-source library or public dataset split.
Model Summary
| Property |
Value |
| Model ID |
cn_ecapa_tdnn_small_arcface |
| Hugging Face Repository |
wq2012/cn_ecapa_tdnn_small_arcface |
| Hugging Face Collection |
FlaxSpeaker Collection |
| GitHub Repository |
wq2012/FlaxSpeaker |
| PyPI Package |
flaxspeaker |
| Backbone Architecture |
ecapa_tdnn (small) |
| Temporal Pooling |
asp |
| Training Loss |
arcface |
| Verification Scoring |
cosine |
| Output Embedding Dim |
192 |
| Encoder Parameters |
1,684,416 |
| Training Domain |
cnceleb2 |
| Audio Frontend |
80-dim log_mel @ 16000 Hz + Energy VAD + CMVN |
Model Files Included
model.safetensors: Primary model weights in SafeTensors format
flax_model.msgpack: Native Flax Msgpack serialized parameters
config.json: FlaxSpeakerConfig model & training architecture configuration
preprocessor_config.json: WhisperFeatureExtractor-compatible frontend configuration
eval_results.json: Verified multi-domain evaluation metrics (1-utt & 3-utt EER, minDCF, ROC-AUC, 95% bootstrap CIs)
Quickstart Usage
Python API (from Hugging Face Hub or Local Directory)
from flaxspeaker import load_pretrained
model = load_pretrained("wq2012/cn_ecapa_tdnn_small_arcface")
emb = model.extract_embedding("path/to/utterance.flac")
score = model.verify("path/to/enroll.flac", "path/to/test.flac")
print(f"Embedding shape: {emb.shape}, Verification score: {score:.4f}")
Command-Line Inference
python scripts/inference.py --model_dir wq2012/cn_ecapa_tdnn_small_arcface \
--enroll_audio path/to/enroll.flac --test_audio path/to/test.flac
Multi-Domain Evaluation Results
1-Utterance Verification Across Evaluation Domains
| Evaluation Split |
Trials |
EER (%) |
95% Bootstrap CI (%) |
[email protected] |
[email protected] |
ROC-AUC |
| LibriSpeech (English Read) |
3,000 |
30.53% |
[28.87, 32.08] |
0.9927 |
0.9607 |
0.7678 |
| CN-Celeb2 (Chinese Multi-Genre) |
3,000 |
28.07% |
[26.53, 29.70] |
0.9980 |
0.9733 |
0.7956 |
| VoxCeleb1 (In-the-Wild Celebrity) |
2,000 |
31.40% |
[29.20, 33.25] |
0.9870 |
0.9870 |
0.7423 |
| Universal Pooled (All 3 Domains) |
8,000 |
30.23% |
[29.29, 31.18] |
0.9987 |
0.9748 |
0.7648 |
| Universal Macro-Average (3 Domains) |
8,000 |
30.00% |
— |
0.9926 |
0.9737 |
0.7686 |
3-Utterance Multi-Enrollment Verification Across Evaluation Domains
| Evaluation Split |
Trials |
3-Utt EER (%) |
95% Bootstrap CI (%) |
[email protected] |
ROC-AUC |
| LibriSpeech (3-Utt) |
1,000 |
23.40% |
[20.60, 25.80] |
0.9500 |
0.8554 |
| CN-Celeb2 (3-Utt) |
1,000 |
23.80% |
[20.65, 26.40] |
0.9720 |
0.8489 |
| VoxCeleb1 (3-Utt) |
1,000 |
31.20% |
[28.20, 34.40] |
0.9760 |
0.7633 |
| Universal Pooled (3-Utt) |
3,000 |
26.47% |
[25.00, 28.20] |
0.9780 |
0.8182 |
| Universal Macro-Average (3-Utt) |
3,000 |
26.13% |
— |
0.9660 |
0.8225 |
Citation
@inproceedings{wan2018generalized,
title={Generalized End-to-End Loss for Speaker Verification},
author={Wan, Li and Wang, Quan and Papir, Alan and Moreno, Ignacio Lopez},
booktitle={IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
pages={4879--4883},
year={2018}
}
@inproceedings{pelecanos2021dr,
title={Dr-Vectors: Decision Residual Networks and an Improved Loss for Speaker Recognition},
author={Pelecanos, Jason and Wang, Quan and Moreno, Ignacio Lopez},
booktitle={Interspeech},
pages={4603--4607},
year={2021}
}
@inproceedings{wang2022attentive,
title={Attentive Temporal Pooling for Conformer-based Streaming Language Identification in Long-form Speech},
author={Wang, Quan and Yu, Yang and Pelecanos, Jason and Huang, Yiling and Moreno, Ignacio Lopez},
booktitle={The Speaker and Language Recognition Workshop (Odyssey)},
year={2022}
}
@inproceedings{pelecanos2022parameter,
title={Parameter-Free Attentive Scoring for Speaker Verification},
author={Pelecanos, Jason and Wang, Quan and Huang, Yiling and Moreno, Ignacio Lopez},
booktitle={The Speaker and Language Recognition Workshop (Odyssey)},
year={2022}
}