Downloads · 30 days
8
13% of all-time downloads
LyngualLabs/yecs-asr-whisper-lid
yecs-asr-whisper-lid is a automatic speech recognition model from LyngualLabs. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
A Yoruba–English code-switching ASR model that jointly transcribes speech and labels the language of every word inline, in a single decoding pass:
Downloads · 30 days
8
13% of all-time downloads
All-time downloads
60
Public
Parameters
242M
967 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors967 MB · 100%
From the Hugging Face model README
A Yoruba–English code-switching ASR model that jointly transcribes speech and labels the language of every word inline, in a single decoding pass:
<en> first aid </en> <yo> ni wọ́n ṣáré fún kí ó tó kú </yo>
It is openai/whisper-small (244M)
fine-tuned on the YECS Yoruba–English code-switching corpus, with four language-tag
tokens (<yo> </yo> <en> </en>) added to the tokenizer and the decoder embeddings
resized. Language-boundary prediction is learned as an auxiliary task at zero extra
inference cost — one model does transcription and per-word language ID.
Scored against the plain-fine-tuned control with identical normalization. Language tags are stripped from both reference and hypothesis before computing WER/CER, so the transcription comparison is apples-to-apples; the tags are scored separately as LID.
| Metric | Tag-injection (this model) | Plain baseline |
|---|---|---|
| WER — tone-aware | 16.79% | 16.69% |
| WER — tone-insensitive | 14.02% | 13.83% |
| CER — tone-aware | 6.24% | 6.37% |
| CER — tone-insensitive | 5.02% | 5.09% |
| Per-word LID — accuracy | 99.54% | — |
| Per-word LID — macro-F1 | 99.54% | — |
Adding inline tags matches the plain model's WER (within run-to-run noise; CER is
actually a touch better) while delivering 99.54% per-word language identification for
free. For reference, the reported whisper-small-yoruba baseline is 20.76% WER; this
project's plain 5-epoch fine-tune reaches 16.69%.
The tag-vs-plain A/B was run identically on three model families:
| Model | WER tone-aware (plain → tag) | Per-word LID (tag) |
|---|---|---|
| Omnilingual CTC 300M | 33.57 → 32.45 | 98.04% |
| Omnilingual LLM 1.63B | 16.15 → 16.29 | 99.55% |
| Whisper-small (this) | 16.69 → 16.79 | 99.54% |
Inline language-tag injection costs ~nothing on WER (−1.1 to +0.1 absolute) and gives 98–99.5% free per-word LID on CTC, LLM, and Whisper alike.
language_tags are grouped
into contiguous same-language spans and wrapped: <yo> … </yo> <en> … </en>.add_tokens(..., special_tokens=False)
so they are ordinary vocabulary items that survive decode(skip_special_tokens=True)
(unlike control tokens, which would be dropped). Embeddings are resized to match.Seq2SeqTrainer, language conditioning yoruba,
task transcribe.NFC → lowercase → strip Unicode punctuation/symbol categories (P/S). Two variants:
The gap between the two measures how well the model handles Yoruba tone marking.
from transformers import WhisperForConditionalGeneration, WhisperProcessor
import torch, librosa
repo = "LyngualLabs/yecs-asr-whisper-lid"
proc = WhisperProcessor.from_pretrained(repo)
model = WhisperForConditionalGeneration.from_pretrained(repo, torch_dtype=torch.bfloat16).to("cuda").eval()
audio, _ = librosa.load("utterance.wav", sr=16000) # 16 kHz mono
feats = proc.feature_extractor(audio, sampling_rate=16000, return_tensors="pt").input_features
ids = model.generate(feats.to("cuda", torch.bfloat16),
language="yoruba", task="transcribe", max_new_tokens=225)
print(proc.tokenizer.batch_decode(ids, skip_special_tokens=True)[0])
# -> '<en> ... </en> <yo> ... </yo>'
Strip the tags for a plain transcript, or parse the spans to recover per-word language.
openai/whisper-small · 5 epochs · lr 1e-5 · bf16 · effective batch 32 · 1×H200.yoruba, task transcribe; forced_decoder_ids=None,
suppress_tokens=[]; best checkpoint by dev WER.afroscale_ai_cmu_africa/yecs-lid, run whisper-tag).Research on Yoruba–English code-switching ASR and per-word spoken language identification.
yo, en); other languages are out of scope.tag-injection/)Scored on the full held-out YECS test split (9,949 utts); test audio is the canonical
Mozilla/MDC release. Test reference labels are held privately by LyngualLabs (public
test_metadata.csv has targets stripped), so metrics are internal and not independently
reproducible.
Apache-2.0 (inherited from openai/whisper-small). YECS corpus terms apply to the
training data.