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 was used (and none of the prohibited corpora Hypa-Voices, omnilingual-asr-corpus or african-speech-ipa directly). - 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- Attribution and licence terms as in the dataset's
ATTRIBUTION.md.
- Fine-tuning: mode
full, 4 epoch(s) max, early stopping on the official language-weighted F1; random 6.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.4, 'snr_db': [10.0, 30.0], 'p_phone': 0.3}
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.6643
- Macro-F1 (classes present): 0.6935 · accuracy: 0.8762 · clips: 4378
| code | precision | recall | F1 | support |
|---|---|---|---|---|
yor | 0.961 | 0.742 | 0.838 | 330 |
ibo | 0.940 | 0.993 | 0.965 | 704 |
hau | 0.892 | 0.996 | 0.941 | 495 |
ego | 0.777 | 0.991 | 0.871 | 222 |
anw | 0.896 | 0.984 | 0.938 | 387 |
efi | 0.098 | 0.078 | 0.087 | 64 |
ibb | 0.387 | 0.271 | 0.319 | 107 |
idu | 0.909 | 0.884 | 0.896 | 450 |
igl | 0.444 | 0.571 | 0.500 | 49 |
nup | 0.254 | 0.577 | 0.353 | 26 |
tiv | 0.769 | 0.282 | 0.412 | 213 |
urh | 0.985 | 0.984 | 0.985 | 550 |
other | 0.897 | 0.924 | 0.910 | 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.0362 s
- Peak process RSS: 1.50 GB · CUDA peak allocated 0.50 GB / reserved 1.70 GB
- Load time: 1.41 s
- Local efficiency estimate (competition formula, this hardware): 0.6909 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.