Nigerian spoken-language identification (DSN 2026)
Classifies a speech clip as one of 12 Nigerian languages or other. Built for the DSN 2026 AI Bootcamp
challenge Find the Language I Am Speaking. A standard transformers audio-classification model: no custom code.
from transformers import pipeline
clf = pipeline('audio-classification', model='<this repo>')
clf('clip.wav') # 16 kHz mono expected; the pipeline resamples files
Model
- Architecture:
HubertForSequenceClassification— pretrained encoderutter-project/mHuBERT-147(revision7ad3fc0bc5106c58c9c13526abccad527150d135) - Transformer layers kept: 12 of 12
- Parameters: 94,571,917 · saved weights: float16 safetensors · repository size 189.2 MB
- Input: 16 kHz mono waveform, processed by the saved feature extractor (
preprocessor_config.json).
Labels (logit order)
| id | code | language | official score weight |
|---|---|---|---|
| 0 | yor | Yoruba | 4.3% |
| 1 | ibo | Igbo | 4.3% |
| 2 | hau | Hausa | 4.3% |
| 3 | ego | Eggon | 8.7% |
| 4 | anw | Annang | 8.7% |
| 5 | efi | Efik | 8.7% |
| 6 | ibb | Ibibio | 8.7% |
| 7 | idu | Idoma | 8.7% |
| 8 | igl | Igala | 8.7% |
| 9 | nup | Nupe | 8.7% |
| 10 | tiv | Tiv | 8.7% |
| 11 | urh | Urhobo | 8.7% |
| 12 | other | non-target speech (English, Nigerian Pidgin, other Nigerian and further languages) | 8.7% |
Training
- Data:
Data-Science-Nigeria/dsn-2026-lid-train(revision87cf6d4b1c7599f97f44b6e6aade86438369a2b1), train split only. No external data. - Sources inside that dataset and their licences (from its card):
afrispeech_ipa— CC-BY-4.0 (dataset card notes upstream audio terms were not verified)hypa_voices— Apache-2.0omnilingual_asr— CC-BY-4.0 — cite arXiv:2511.09690 when using this portion in research
- Fine-tuning: mode
full, 5 epoch(s) max, early stopping on the official language-weighted F1; random 10.0 s crops; AdamW (encoder lr 5e-05, head lr 0.0005, weight decay 0.01); lossce(label smoothing 0.0); convolutional feature encoder frozen. - Augmentation: {'gain_db': 6.0, 'p_noise': 0.6, 'snr_db': [5.0, 25.0], 'p_phone': 0.4}
Evaluation
Model selection on the official validation split (speaker-disjoint from train per the dataset card) plus a speaker-disjoint 15% holdout of training clips for classes absent from validation (nup); the holdout was not used for training. Dev clips byte-identical to a train clip were removed.
- Language-weighted F1 (official weights): 0.6286
- Macro-F1 (classes present): 0.6638 · accuracy: 0.8406 · clips: 4378
| code | precision | recall | F1 | support |
|---|---|---|---|---|
yor | 1.000 | 0.733 | 0.846 | 330 |
ibo | 1.000 | 0.919 | 0.958 | 704 |
hau | 0.994 | 0.980 | 0.987 | 495 |
ego | 0.946 | 0.860 | 0.901 | 222 |
anw | 0.912 | 0.964 | 0.937 | 387 |
efi | 0.286 | 0.031 | 0.056 | 64 |
ibb | 0.273 | 0.551 | 0.365 | 107 |
idu | 0.723 | 0.964 | 0.827 | 450 |
igl | 0.389 | 0.286 | 0.329 | 49 |
nup | 0.158 | 0.692 | 0.257 | 26 |
tiv | 0.326 | 0.352 | 0.339 | 213 |
urh | 0.970 | 0.998 | 0.984 | 550 |
other | 0.952 | 0.757 | 0.843 | 781 |
Measured inference cost
Hardware: Tesla T4; torch 2.11.0+cu128; dtype loaded torch.float16; batch size 1.
- Mean latency per clip (feature extraction + forward + argmax): 0.0350 s
- Peak process RSS: 9.96 GB · CUDA peak allocated 0.50 GB / reserved 1.70 GB
- Load time: 1.44 s
- Local efficiency estimate (competition formula, this hardware): 0.6854 Timings depend on hardware; the evaluator's numbers will differ.
Limitations
- Validation data comes from the same corpora as training; the hidden test set is drawn from other corpora, so expect lower accuracy there.
- Closely related languages (e.g. Efik / Ibibio / Annang) are the main source of confusion.
othercovers many languages, including English and Nigerian Pidgin; code-switched speech may be labelled either way.- Very short clips (< 2 s) carry little evidence.
- Hidden-test performance unknown; dev lw-F1 by source is in the training report.
Licence
Weights are derived from utter-project/mHuBERT-147, released under CC-BY-NC-SA-4.0; this model is distributed under the same terms. Training data attribution as listed above.