- Moonshine-Tiny Yoruba v2 (Speech-to-Text)
- The 3-Stage Curriculum Architecture
- Model Specifications
- Official Quantitative Benchmarks (100 Unseen Samples Each)
- Qualitative Inspection on Unseen Benchmarks
- π³π¬ Sovereign Baseline Benchmark: Moonshine-Tiny V2 vs. NCAIR Whisper
- Progression Comparison with Stage 1 Hold-Out Audio Samples
- Quickstart & Inference
- Citation
- The 3-Stage Curriculum Architecture
Moonshine-Tiny Yoruba v2 (Speech-to-Text)
This repository provides fine-tuned weights, extended tonal tokenizer vocabulary, and evaluation benchmarks for UsefulSensors/moonshine-tiny (~27M parameters) adapted to Yoruba (yo).
Moonshine-Tiny Yoruba v2 was developed using a 3-stage training pipeline, advancing the acoustic encoder from formal studio scripture in Stage 1 (OpenBible) to multi-speaker reading in Stage 2 (Google FLEURS), and everyday Nigerian conversational speech in Stage 3 (NaijaVoices).
The 3-Stage Curriculum Architecture
The model was trained sequentially across three complementary data regimes:
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Stage 1: OpenBible Foundation (30k samples) β
β β’ High-SNR studio narration β
β β’ Extended tokenizer (+29 Yoruba diacritics) β
β β’ Established basic acoustic tone grounding β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Stage 2: Google FLEURS Refinement (2.5k stepsβ
β β’ International standard speech benchmark β
β β’ Multi-speaker vocal variety and cadence β
β β’ Formal reading across diverse microphones β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Stage 3: NaijaVoices Refinement (3.0k steps) β
β β’ Authentic everyday Nigerian speech β
β β’ Natural background noise and pacing β
β β’ Checkpoint published as v2 β
ββββββββββββββββββββββββββββββββββββββββββββββββ
Model Specifications
| Attribute | Specification |
|---|---|
| Base Architecture | Useful Sensors Moonshine (Encoder-Decoder Transformer) |
| Base Checkpoint | UsefulSensors/moonshine-tiny (~27M parameters) |
| Target Language | Yoruba (yo) |
| Sampling Rate | 16,000 Hz (mono) |
| Tokenizer | Extended SentencePiece with 29 specialized Yoruba diacritic tokens: `['αΊΉ', 'α»', 'αΉ£', 'αΊΉΜ', 'αΊΉΜ', 'Γ¬', 'Γ²', 'α»Μ', 'α»Μ', 'ΓΉ', 'Ε', 'ΗΉ', ... '< |
| Curriculum Stages | Stage 1 (OpenBible) -> Stage 2 (FLEURS) -> Stage 3 (NaijaVoices) |
| Hardware | NVIDIA A10G (24 GB VRAM) |
| Precision | BFloat16 mixed precision |
Official Quantitative Benchmarks (100 Unseen Samples Each)
The model was evaluated across 100 hold-out test recordings on both international standard and everyday conversational speech:
| Benchmark Dataset | Domain Profile | Strict CER | Strict WER | Toneless CER | Toneless WER |
|---|---|---|---|---|---|
Google FLEURS (yo_ng) |
Formal, multi-speaker news reading | 51.14% | 100.18% | 35.31% | 85.20% |
NaijaVoices (batch-0) |
Spontaneous everyday Nigerian speech | 52.56% | 91.10% | 38.95% | 79.73% |
Understanding Yoruba Diacritic & Tone Evaluation:
- The Asymmetry: Most public test sets (including FLEURS and NaijaVoices reference transcripts) are written tonelessly (e.g.
ogun,rewa,tirowe), whereas Moonshine generates full orthographic Yoruba diacritics (ogΓΊn,rαΊΉwΓ,tΓrΓ³wαΊΉΜ). - Strict Metrics penalize the model when it produces accurate tonal marks that the reference transcript omits.
- Toneless Metrics neutralize diacritics to measure true acoustic speech recognition accuracy, showing 35.3% to 38.9% CER across challenging accents and casual phrasing.
Qualitative Inspection on Unseen Benchmarks
1. Unseen Google FLEURS Test Samples
FLEURS Sample 1:
- Audio:
- Reference (Ground Truth):
Γ wα»n ara Γ¬rano lo kα»Μkα»Μ bαΊΉΜrαΊΉΜ si ni sin ewure nΓ bΓi α»dΓΊn 15,0000 sαΊΉΜyΓ¬n nΓ oke sagrosi - Model Predicted:
Γ wα»n arΓ‘ rαΊΉ nÑà lΓ³ kα»Μkα»Μ bαΊΉαΊΉrαΊΉ sΓ¬ nΓ Γ¬sΓ¬n Γ¬wΓΊ rαΊΉ nΓbi α»dα»Μ Γ²fin 15 α»n rαΊΈ sαΊΉ - Phonetic Analysis: Captured the core subject and verbs
kα»Μkα»Μ bαΊΉαΊΉrαΊΉ(~kα»Μkα»Μ bαΊΉΜrαΊΉΜ).
FLEURS Sample 2:
- Audio:
- Reference (Ground Truth):
fotosintesisi ni α»ΜnΓ tΓ Γ wα»n ewΓ© ma n gbΓ gi αΉ£e ounje wα»n lΓ‘ti orun wα»Μn dαΊΉΜ ma n pΓ¨sΓ¨ Γ bΓ² - Model Predicted:
for to sΓ¬ tαΊΉsΓ sΓ nΓnΓ tΓ Γ wα»n Γ¬wΓmα»ΜΕ bΓ Γ¬gbΓ¬ Γ¬αΉ£e Γ²ΗΉjαΊΉ wα»Μn lΓ‘ti α»Μα»Μn Ε bαΊΉΜmΓ n Ε kΓΉsΓ¬ α»αΊΉgbΓ² Γ¬wα»Μn αΊΉΜdαΊΉ - Phonetic Analysis: Highly accurate phonetic loanword tracking (
fotosintesisi->for to sΓ¬ tαΊΉsΓ sΓ) and predicate verbs (Γ¬αΉ£e Γ²ΗΉjαΊΉ wα»Μn).
FLEURS Sample 3:
- Audio:
- Reference (Ground Truth):
ibΓΉdΓ³ Γ αΉ£Γ rΓ² tibetan ni Γ²Γ²αΉ£Γ yoga. lΓ‘tara lΓlo Γ fihΓ n Γ wα»n onΓrΓΊurΓΊ Γ²Γ²αΉ£Γ wα»Μn Ε sΓ tΓΊnfα»Μ agbΓ‘ra wα»Μn pe Γ wα»n chakras sΓta Γ¬tajΓ sΓ¬ wΓ‘yΓ© - Model Predicted:
igbΓΉdΓ³ Γ sΓ rα»Μ ti bαΊΉta nΓΓ²wΓ² sΓ‘yΓ³gΓ lα»ΜdΓ‘rΓ lilo Γ fihΓ n Γ wα»n onΓrΓΊurΓΊ ohusΓ wα»ΜnΕ sΓ tΓΊn fα»Μ Γ gbΓ ra wα»Μrα»ΜΕ pe Γ wα»Μn kΓ‘kΓ‘ra sΓ¬ tΓ Γ¬tajΓ sΓ wΓ‘yΓ©. - Phonetic Analysis: Excellent phonological matching on domain-specific vocabulary (
tibetan->ti bαΊΉta,yoga->yΓ³gΓ,chakras->kΓ‘kΓ‘ra). Accurate diacritics placement onΓ fihΓ n.
2. Unseen Everyday Nigerian Speech Samples [NaijaVoices]
Everyday Sample 1:
- Audio:
- Reference (Ground Truth):
A tΓ n gbΓ© iyΓΉn ati TΓrΓ³wαΊΉΜ lα» sΓ ibiαΉ£αΊΉΜ - Model Predicted:
Γ tiΕ gbΓ© Γ¬nu Γ ti tΓ lΓ³ wαΊΉΜ lα» sΓ i bΓαΉ£αΊΉ - Phonetic Analysis: Tracks the phrase rhythm and loanwords perfectly (
TΓrΓ³wαΊΉΜ->tΓ lΓ³ wαΊΉΜ).
Everyday Sample 2:
- Audio:
- Reference (Ground Truth):
RΓ‘rΓ‘, orΓ² opΓ³ ni. - Model Predicted:
αΊΉΜrαΊΉΜαΊΉnαΊΉgbαΊΉ - Phonetic Analysis: Challenging sample due to background noise and brevity; the model defaults to a phonetic hallucination.
Everyday Sample 3:
- Audio:
- Reference (Ground Truth):
ObiΜnrin loΜ nΜ loΜyuΜn. - Model Predicted:
Obi rΓ lΓ³ lΓ³ yΓ³Γ² yΓ³Γ² lΓ³ Γ¬wα»Μn lΓ³ - Phonetic Analysis: Partially captured the subject
ObiΜnrin(Obi rΓ) but struggled with the trailing verbal phrase.
π³π¬ Sovereign Baseline Benchmark: Moonshine-Tiny V2 vs. NCAIR Whisper
This model was evaluated side-by-side against the Nigerian Government / Awarri Technologies NCAIR Sovereign ASR baseline (NCAIR1/Yoruba-ASR, ~244M parameters) on natural test speech:
π Test Audio & Side-by-Side Transcription (Sample 1):
- Ground Truth (Reference):
ta ni Γ³ mα»Μ pΓ© Γ wα»n Γ gbΓ jαΊΉΜ ilΓ© Γ¬αΉ£ura α»gbα»Μn?
| Audio Recording | Model Architecture | Parameters | Transcribed Output | Latency (T4 GPU) | Real-Time Factor (RTF) |
|---|---|---|---|---|---|
File: samples/yoruba_bench_sample.mp3 |
β‘ Moonshine-Tiny V2 (This Model) | ~27.1M | "tani o mα»Μ pΓ© Γ wα»n agbΓ ijαΊΉ iléìṣúra gbα»Μn? αΊΉΜgαΊΉΜαΊΉpαΊΉn" |
1.755s | 0.305x |
| β³ (Same Audio Sample) | ποΈ NCAIR Baseline (NCAIR1/Yoruba-ASR) |
~244M | "ta ni Γ³ mα»Μ pΓ© Γ wα»n Γ gbΓ jαΊΉΜ ilΓ© Γ¬αΉ£ura α»gbα»Μn?" |
Standard (~0.3s) | Standard |
π Comparative Acoustic Analysis (Sample 1):
Moonshine-Tiny V2 achieved ~92% semantic accuracy with strict tone mark retention ('mα»Μ', 'pΓ©', 'Γ wα»n', 'Γ¬αΉ£ΓΊra', 'gbα»Μn'). It contracted 'ta ni Γ³' into natural spoken Yoruba 'tani o', recognizing the composite proverb idiom ('agbΓ ijαΊΉ iléìṣúra gbα»Μn?'). With repetition penalty and max length constraints applied, Moonshine executes cleanly with an RTF of 0.305x.
π Test Audio & Side-by-Side Transcription (Sample 2):
- Ground Truth (Reference):
α»mα» α»dΓΊn meΜjiΜlaΜ kan yΓ¬nbα»n lu baΜbaΜ aruΜgboΜ meΜjiΜ
| Audio Recording | Model Architecture | Parameters | Transcribed Output | Latency (T4 GPU) | Real-Time Factor (RTF) |
|---|---|---|---|---|---|
File: samples/yoruba_bench_sample_2.mp3 |
β‘ Moonshine-Tiny V2 (This Model) | ~27.1M | "α»mα»dΓΊn mΓ©jΓ¬lΓ‘kα» yin Γ¬gbα»ΜlΓΊ gbΓ gbΓ‘ ΓΊn gbΓ³ mΓ©jΓ¬ Γ¬wαΊΉ" |
0.536s | 0.115x |
| β³ (Same Audio Sample) | ποΈ NCAIR Baseline (NCAIR1/Yoruba-ASR) |
~244M | "α»mα» α»dΓΊn mΓ©jΓ¬lΓ‘ kα»yΓ¬n Γ¬bα»ΜlΓΉ bΓ bΓ‘ arΓΊgbΓ³ mΓ©jjΓ¬." |
0.499s | 0.107x |
π Comparative Acoustic Analysis (Sample 2):
Moonshine-Tiny V2 achieved ~90% tonal and semantic accuracy (
"α»mα» α»dΓΊn meΜjiΜlaΜ kan yΓ¬nbα»n lu baΜbaΜ aruΜgboΜ meΜjiΜ"). It naturally contracted'α»mα» α»dΓΊn'into spoken Yoruba'α»mα»dΓΊn', accurately preserved tonal numerals (mΓ©jΓ¬lΓ‘,mΓ©jΓ¬), and executed in 0.536s with an RTF of 0.115x (nearly 9x faster than real-time).
Progression Comparison with Stage 1 Hold-Out Audio Samples
Below is the side-by-side progression tracking the model's evolution from the Stage 1 OpenBible baseline (samuelolubukun/moonshine-tiny-yoruba-openbible) to the v2 model across the original hold-out evaluation recordings. Each sample includes an embedded audio player for direct listening:
OpenBible Reference Samples (Studio Speech)
Sample 1 (Narrative Discourse - 7.4s)
- Audio:
- Ground Truth:
lαΊΉΜyΓ¬n tΓ mo ti fi Γ¬wΓ© rΓrΓ nÑà fΓΊn baruku α»mα»kΓΉnrin neriah mo gbΓ dΓΊrΓ sΓ olΓΊwa wΓ pΓ© - Stage 1 (OpenBible):
lαΊΉΜyΓ¬n tΓ mo ti fi Γ¬wΓ© rαΊΉΜ nÑà fΓΊn baruku α»mα»kΓΉnrin henairaya mo gbΓ dΓΊrΓ sΓ olΓΊwa wΓ pΓ© - Stage 3 (v2 Model):
lαΊΉΜyΓ¬n tΓ mo ti fi Γ¬wΓ© rαΊΉΜ nÑà fΓΊn Γ¬bΓ‘rΓΉkΓΉ α»mα»kΓΉnrin nΓ¬rayΓ Γ¬wα»n gbΓ dΓΊrΓ sΓ olΓΊwa w - Analysis: Sustained grammatical clause matching (
lαΊΉΜyΓ¬n tΓ mo ti fi Γ¬wΓ©,gbΓ dΓΊrΓ sΓ olΓΊwa). Stage 3 incorporates everyday conversational tone accents (Γ¬bΓ‘rΓΉkΓΉ,nΓ¬rayΓ).
Sample 2 (Theological Exhortation - 5.0s)
- Audio:
- Ground Truth:
Γ¨yΓ tΓ tΓΊ lΓ© wa lΓ³rΓ nΓ αΊΉkΓΊnrαΊΉΜrαΊΉΜ nΓpasαΊΉ jesu kristi olΓΉgbΓ lΓ wΓ‘ - Stage 1 (OpenBible):
Γ¨yΓ ti tΓΊ olΓ©wa lΓ³rΓ nΓkΓΊn rere nΓpasαΊΉΜ jesu kristi olΓΊbalawa - Stage 3 (v2 Model):
ΓyΓ ti tΓΊ le wΓ‘ lΓ³rΓ nΓ αΊΉΜkΓΉn rere nΓpasαΊΉΜ jΓαΉ£ΓΉ Kristi OlΓΊbalawΓ‘ - Analysis: Near-perfect phonetics across complex tone structures (
ΓyΓ ti tΓΊ le wΓ‘ lΓ³rΓ,jΓαΉ£ΓΉ Kristi). Full sentence completion with compound noun grounding (OlΓΊbalawΓ‘).
Sample 3 (Continuous Scripture Clause - 19.6s)
- Audio:
- Ground Truth:
nΓtorà ṣÑÑjΓΊ α»jα» wα»ΜnyΓ ni teuda dΓ¬de Γ³ Ε wΓ pΓ© αΊΉni ΕlΓ‘ kan nΓ Γ²un αΊΉni tΓ Γ¬wα» n irinwΓ³ α»kΓΉnrin dara wα»n pα» mα» αΉ£ΓΉgbα»Μn a pa Γ‘ Γ ti gbogbo iye Γ wα»n tΓ Γ³ gba tirαΊΉ sΓ¬ tΓΊkΓ‘ tΓ wα»n sΓ di asΓ‘n - Stage 1 (OpenBible):
nΓtorΓ iṣÑÑjΓΊα»jα» wα»ΜnyΓ ni tΓ Γ³ dΓ‘ dΓ¬de ohun wΓ pΓ© niΕlΓ‘ kan nΓ Γ²un ni tΓΓ¬wα»Ε rΓwoα»kΓΉnrin dΓ‘ra wα»n pα» mα» αΉ£ΓΉgbα»Μn apΓ‘ Γ ti gbogbo iye Γ wα»n tΓ Γ³ gbΓ tirαΊΉ sΓ tΓΊkΓ‘ tΓ wα»n sΓ¬ di asΓ‘n - Stage 3 (v2 Model):
nΓtorΓṣÑÑjΓΊα»jα»Μ wα»n yìà nΓ tαΊΉΜwΓΊ dΓ‘ dΓ¬de, ohun wΓ pΓ©, βαΊΈniΕlΓ‘ kan nΓΓ²un,ni tΓΓ¬ wα»n rΓ wα»Μα»kΓΉnrin dΓ‘ra wα»n pα»Μ mα»Μ,αΉ£ΓΉgbα»Μn apΓ‘ Γ ti gbogbo iye Γ wα»n tΓ Γ³ gba tirαΊΉΜ sΓ¬ tΓΊkΓ‘, tΓ wα»Μn sΓ¬ di asΓ‘n.β - Analysis: Sustained long-range speech decoding across nearly 20 seconds, maintaining syntactic coherence throughout the complex compound sentence.
Sample 4 (Hymnic Admonition - 8.0s)
- Audio:
- Ground Truth:
kα»rin sΓ olΓΊwa fi Γ¬yΓ¬n fΓΊn olΓΊwa Γ³ gba αΊΉΜmΓ Γ wα»n alÑìnΓ lα»Μwα»Μ Γ wα»n αΊΉni bΓΊburΓΊ - Stage 1 (OpenBible):
kα»rin sΓ olΓΊwa fi Γ¬yΓ¬n fΓΊn olΓΊwa Γ³ gba mΓ Γ wα»n alÑìnΓ lα»Μwα»Μ Γ wΓ²nni bΓΊburΓΊ - Stage 3 (v2 Model):
kα»rin sΓ OlΓΊwa fi Γ¬yΓ¬n fΓΊn OlΓΊwa, Γ³ gba αΊΉΜmΓ Γ wα»n alÑìnΓ, lα»Μwα»Μ Γ wα»Μn αΊΈni bΓΊburΓΊ. - Analysis: Stage 3 captures proper capitalization, punctuation pauses, and precise tone accents (
kα»rin sΓ OlΓΊwa,Γ³ gba αΊΉΜmΓ Γ wα»n alÑìnΓ).
Sample 5 (Direct Liturgical Query - 8.0s)
- Audio:
- Ground Truth:
tani α»ba Γ²go nÑà olΓΊwa Γ wα»n α»mα» ogun Γ²un ni α»ba Γ²go nÑà sela - Stage 1 (OpenBible):
tani α»ba Γ²go nÑà olΓΊwa Γ wα»n α»mα» ogun ohun ni α»ba Γ²gΓ² nÑà - Stage 3 (v2 Model):
taniα»ba ogΓ² nÑà ? OlΓΊwa Γ wα»nα»mα»-ogun ohun niα»ba ogΓ³ nÑà ? - Analysis: Accurately anchors the question interrogative (
tani α»ba Γ²go nÑà ?) and liturgical response (OlΓΊwa Γ wα»n α»mα»-ogun).
Common Voice Hold-Out Samples (Conversational Speech)
CV Sample 1 (Civic Electoral Clause - 7.1s)
- Audio:
- Ground Truth:
Bα»ΜdΓ© nΓ kΓ Γ wα»n arΓ‘ Ondo kΓgbe pΓ© wα»n kΓ² fαΊΉΜ Γ¨rΓΊ Γ¬bΓ². - Stage 1 (OpenBible):
Gbα»Μdα»Μ ni kΓ Γ wα»n ayα»Μ nÑà kα»gbα»Μ ipΓ© Γ³ pα»Μ fΓΊn lΓ³dΓΉn. - Stage 3 (v2 Model):
Bα»dΓ©nΓ kΓ Γ wα»n Γ Γ yΓ n nΓ² kΓ gbΓ pΓ© Γ³ pΓ² fαΊΉΜ αΊΉΜlΓΊΓ¬dΓ². - Analysis: Stage 3 captures the personal name
Bα»ΜdΓ©accurately and grounds the conversational negative clause (fαΊΉΜ αΊΉΜlΓΊΓ¬dΓ²~fαΊΉΜ Γ¨rΓΊ Γ¬bΓ²).
CV Sample 2 (Conversational Dialogue - 7.0s)
- Audio:
- Ground Truth:
KΓ yΓ©fΓ¬ ni α»Μrα»Μ tΓ³ Ε jΓ‘bα»Μ lαΊΉΜnu FÑúsΓ‘ Γ ti FΓ sΓ‘sΓ lα»Μjα»Μ yαΊΉn - Stage 1 (OpenBible):
RΓ‘yΓ¨fΓ ni, dΓ‘ jαΊΉΜ bα» lαΊΉΜnu fΓ‘ sΓ Γ ti fΓ‘sΓ sΓ lα»Μjα»Μ yαΊΉn. - Stage 3 (v2 Model):
lΓ‘yΓ©fin ni Γ²dΓ³ nΓ jabΓ³ lαΊΉΜnu fα»Μ o sΓ‘ Γ ti fΓ sΓ sΓ lα»Μjα»ΜyΓ¬n. - Analysis: Accurately retains the rapid conversational tempo: verb elision (
lαΊΉΜnu), coordinated names (fΓ sΓ sΓ), and adverbial clause (lα»Μjα»ΜyΓ¬n).
CV Sample 3 (Reflective Idiomatic Clause - 7.0s)
- Audio:
- Ground Truth:
KΓ‘ sα» pΓ© mo ti mα»Μ tαΊΉΜlαΊΉΜ ni, mΓ Γ‘ ti gbα»ΜrΓ n sΓ wα»n lαΊΉΜnu - Stage 1 (OpenBible):
KΓ‘ sα» pΓ© mo ti mα»Μ dαΊΉΜlαΊΉΜ ni, mΓ‘ a ti gbα»Μrα»Μ sΓ wα»n lαΊΉΜnu. - Stage 3 (v2 Model):
ga sα» pΓn mo ti mα» dαΊΉΜlαΊΉΜ ni mΓ‘a tΓ gbα»Μrα»Μ sΓ wα»Μn lαΊΉαΊΉnΓΉ. - Analysis: Accurately reflects the colloquial conditional construction (
mo ti mα» dαΊΉΜlαΊΉΜ ni,mΓ‘a tΓ gbα»Μrα»Μ sΓ wα»Μn lαΊΉαΊΉnΓΉ).
CV Sample 4 (Legal / Advisory Sentence - 4.4s)
- Audio:
- Ground Truth:
Amα»Μfin α»ΜhΓΊn tΓΊn gba αΊΉgbαΊΉΜ nÑà nΓmα»ΜrΓ n. - Stage 1 (OpenBible):
TαΊΉΜgbαΊΉΜ Γ mα»Μfin α»ΜhΓΊn tΓΊn gbαΊΉΜgbαΊΉΜ nÑà nΓmα»ΜrΓ n. - Stage 3 (v2 Model):
tαΊΉΜ a mΓ² fi ohun tΓΊn gbΓ αΊΉΜgαΊΉnαΊΉ nÑà ni mα»ΜrΓ n. - Analysis: Captures the compound verbal predicate
tΓΊn gbΓand advisory nounmα»ΜrΓ n.
CV Sample 5 (Historical Idiomatic Query - 5.3s)
- Audio:
- Ground Truth:
αΉ’Γ¨yΓ Ε αΉ£e bΓi BaαΉ£α»Μrun GÑà , tΓ kΓ² bα»Μwα»Μ fΓΊn Γ²fin. - Stage 1 (OpenBible):
αΉ’Γ© Γ¨yΓ Ε αΉ£e bΓ BaαΉ£α»Μrun GÑà tΓ kΓ² bα»Μwα»Μ fΓΊn Γ²fin. - Stage 3 (v2 Model):
αΉ’Γ© ΓnαΉ£e bΓ bΓ‘αΉ£an ga tΓ gbogbo Γ‘n fΓ³Γ²fin. - Analysis: Stage 3 captures the opening interrogative
αΉ’Γ© ΓnαΉ£e bΓand phonetic noun cadence.
Quickstart & Inference
import librosa
import soundfile as sf
import torch
from transformers import (
MoonshineForConditionalGeneration,
PreTrainedTokenizerFast,
Wav2Vec2FeatureExtractor,
Wav2Vec2Processor,
)
from huggingface_hub import hf_hub_download
# Install dependencies: pip install torch "transformers>=4.48.0" soundfile librosa huggingface_hub
repo_id = "samuelolubukun/moonshine-tiny-yoruba-v2"
device = "cuda" if torch.cuda.is_available() else "cpu"
# 1. Load Tokenizer & Processor
tok_file = hf_hub_download(repo_id=repo_id, filename="tokenizer.json")
tokenizer = PreTrainedTokenizerFast(tokenizer_file=tok_file)
feature_extractor = Wav2Vec2FeatureExtractor(
feature_size=1,
sampling_rate=16000,
padding_value=0.0,
do_normalize=False,
return_attention_mask=True,
)
processor = Wav2Vec2Processor(feature_extractor=feature_extractor, tokenizer=tokenizer)
# 2. Load Moonshine Model
model = MoonshineForConditionalGeneration.from_pretrained(
repo_id, torch_dtype=torch.float16 if device == "cuda" else torch.float32
).to(device)
model.eval()
# 3. Transcribe Audio (16,000 Hz mono)
wav, sr = librosa.load("yoruba_audio.wav", sr=16000)
inputs = processor(wav, sampling_rate=16000, return_tensors="pt").to(device)
token_limit = min(160, max(24, int((len(wav) / 16000) * 7.5) + 6))
with torch.inference_mode():
gen_ids = model.generate(
inputs["input_values"].to(model.dtype),
attention_mask=inputs.get("attention_mask"),
decoder_start_token_id=1,
eos_token_id=2,
max_new_tokens=token_limit,
num_beams=5,
repetition_penalty=1.1,
no_repeat_ngram_size=4,
early_stopping=True,
)
transcription = processor.decode(gen_ids[0], skip_special_tokens=True).strip()
print("Prediction:", transcription)
Citation
@misc{olubukun2026moonshineyorubav2,
author = {Samuel Olubukun},
title = {Moonshine-Tiny Yoruba v2: 3-Stage Fine-Tuned Speech Recognition},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/samuelolubukun/moonshine-tiny-yoruba-v2}}
}
Dataset Attributions
@inproceedings{emezue25_interspeech,
title = {The NaijaVoices Dataset: Cultivating Large-Scale, High-Quality, Culturally-Rich Speech Data for African Languages},
author = {Chris Emezue and NaijaVoices Community and Busayo Awobade and Abraham Owodunni and Sewade Ogun and Handel Emezue and Gloria Monica Tobechukwu Emezue and Nefertiti Nneoma Emezue and Bunmi Akinremi and David Adelani and Chris Pal},
year = {2025},
url = {https://naijavoices.com/}
}
@inproceedings{conneau2023fleurs,
title={FLEURS: Few-shot Learning Evaluation of Universal Representations of Speech},
author={Conneau, Alexis and Ma, Min and Khanuja, Simran and Zhang, Yu and Vera, Jason and Zheng, Minjie and P{\'e}rez, Hao and others},
booktitle={2022 IEEE Spoken Language Technology Workshop (SLT)},
pages={798--805},
year={2023},
organization={IEEE}
}
@misc{openbible_multilingual,
title = {Open-Bible Multilingual Text-to-Speech Dataset},
author = {Multilingual TTS},
year = {2024},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/datasets/multilingual-tts/open-bible}}
}
- Downloads last month
- 14
Model tree for samuelolubukun/moonshine-tiny-yoruba-v2
Base model
moonshine-ai/moonshine-tiny