speechbrain/lang-id-voxlingua107-ecapa (ECAPA-TDNN) fine-tuned into a 3-class classifier (si: Sinhala, ta: Tamil, en: English) to route audio to
language-specific ASR models. The output layer was initialised from the pretrained rows of these 3 languages,
so the zero-shot numbers below are the original model restricted to the same 3 classes.
Each clip is classified from its first N seconds (what a streaming router sees); full = up to 10 s.
Test sets: up to 1500 clips per (language, source), speaker-diverse, from the test_* splits.
| zero-shot acc | fine-tuned acc | zero-shot macro-F1 | fine-tuned macro-F1 | |
|---|---|---|---|---|
| 1s | 0.6625 | 0.8810 | 0.5807 | 0.8829 |
| 2s | 0.9078 | 0.9745 | 0.8920 | 0.9731 |
| 3s | 0.9588 | 0.9892 | 0.9532 | 0.9883 |
| full | 0.9838 | 0.9943 | 0.9833 | 0.9938 |
Accuracy per (language, source):
| 1s | 2s | 3s | full | |
|---|---|---|---|---|
| acc_en__libritts_r | 0.9753 | 0.9993 | 1.0000 | 1.0000 |
| acc_si__openslr_sinhala | 0.9600 | 0.9793 | 0.9887 | 0.9940 |
| acc_ta__common_voice_tamil | 0.6400 | 0.9433 | 0.9813 | 0.9873 |
| acc_ta__indic_tts_tamil | 0.9487 | 0.9760 | 0.9867 | 0.9960 |
Best epoch: 5 (selected on mean val macro-F1 over 1s, 2s, 3s, full).
from speechbrain.inference.classifiers import EncoderClassifier
lid = EncoderClassifier.from_hparams(source="TriLinSL/lid-ecapa-voxlingua107-si-ta-en", savedir="pretrained_lid")
out_prob, score, index, label = lid.classify_file("audio.wav") # 16 kHz mono
print(label[0], out_prob.exp()[0]) # out_prob are log-probabilities
For routing, classify the first 2–3 s; if the top probability is below ~0.8, wait for more audio and classify again.
TriLingDATA/si-ta-en-asr, 20 h per language, balanced across sources, round-robin by speaker,
val/test speakers removed from training. Selected clip ids are in data_selection/.| clips | hours | speakers | |
|---|---|---|---|
| en | indic_tts_tamil | 77.0000 | 0.2200 |
| en | libritts_r | 10984.0000 | 20.0000 |
| en | openslr_sinhala | 1352.0000 | 1.4400 |
| si | openslr_sinhala | 16509.0000 | 20.0000 |
| ta | common_voice_tamil | 5617.0000 | 10.0000 |
| ta | indic_tts_tamil | 1592.0000 | 10.0000 |
checkpoints/last.pt 340 MBembedding_model.ckpt 84 MBclassifier.ckpt 550 kBnormalizer.ckpt 1.1 kB