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 ló ń lóyú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 méjiΜ€lá kan yΓ¬nbọn lu baΜ€bá arúgbó mé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 méjiΜ€lá kan yΓ¬nbọn lu baΜ€bá arúgbó mé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 noun mọ́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
Safetensors
Model size
27.1M params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for samuelolubukun/moonshine-tiny-yoruba-v2

Datasets used to train samuelolubukun/moonshine-tiny-yoruba-v2

Space using samuelolubukun/moonshine-tiny-yoruba-v2 1