text-to-speech · audio · WASM · ~38 MB
This is the Yoruba checkpoint of Meta's MMS-TTS family — a distinct model from the
English MMS-TTS demo and the Hindi one: its
own native Yoruba vocabulary (43 symbols, is_uroman:false). Yoruba's orthography is
Latin-based but carries the sub-dot letters ẹ/ọ/ṣ and the tone marks
(à/á, è/é) that encode Yoruba's three tones — glyphs no other checkpoint's vocab includes — so it
speaks tone-marked Yoruba that the Latin-alphabet checkpoints cannot. Yoruba is a major West African
tonal language. VITS is a conditional VAE with normalizing flows and a
stochastic duration predictor: one end-to-end network from text straight to a
waveform, no separate vocoder, and the same Yoruba sentence comes out with slightly different rhythm
every time.
| Model | Xenova/mms-tts-yor (ONNX of facebook/mms-tts-yor) |
|---|---|
| Task / pipeline | text-to-speech — VitsModel, Yoruba text tokens → 16 kHz waveform |
| Architecture | VITS: conditional VAE + normalizing-flow decoder + monotonic alignment + stochastic duration predictor. End-to-end — no separate vocoder. |
| Language / script | Yoruba (yor) in its native tone-marked Latin-based orthography with sub-dot letters ẹ/ọ/ṣ (is_uroman:false) — one of 1000+ MMS languages, each its own checkpoint |
| Output | A mono Float32Array waveform at sampling_rate 16000 |
| Quantization | q8 (8-bit) ONNX (model_quantized.onnx) |
| Backend | WebAssembly (WASM) — runs anywhere; no WebGPU needed |
| Download | ~38 MB, cached after first load |
| License | CC-BY-NC 4.0 (MMS weights) — non-commercial |
| Web APIs | WebAssembly, Web Workers, Web Audio (playback), Blob URLs, Canvas |
Type some Yoruba (with tone marks) and press Sọ (Speak). Synthesis runs in a Web Worker; the audio and waveform below are the real output for this device. Press Speak again to hear how the stochastic duration predictor re-times the very same words.
There is no spectrogram-then-vocoder hop here: VITS predicts the waveform itself. Below is the actual 16 kHz waveform (the bar fills as it plays). The interesting part is timing — VITS decides how long each Yoruba sound lasts with a stochastic module, so re-running the same text changes the duration. Press "Speak again" a few times and watch the length and rhythm shift; the panel tracks how much each run varies.
A Yoruba voice that runs entirely on-device: no per-character bill, no text leaving the tab, and a tiny ~38 MB footprint you can ship inside a PWA or kiosk. Yoruba is spoken by tens of millions across Nigeria, Benin, Togo and the diaspora; on-device TTS for African languages is scarce, so a private, offline Yoruba voice that works everywhere is genuinely useful.
Type a Yoruba line, hear it, see its waveform — the core move.
A Yoruba narrator: read a notification, a weather report or an article snippet aloud.
Stochastic prosody lab — generate the same Yoruba text many times and compare the timing.
Type English, translate it to Yoruba with M2M100, then have MMS speak the Yoruba.
MMS-TTS Yoruba is a one-liner with the text-to-speech pipeline — the Yoruba checkpoint is picked by its id:
import { pipeline } from "@huggingface/transformers";
const tts = await pipeline("text-to-speech", "Xenova/mms-tts-yor", { dtype: "q8" });
const out = await tts("Nẹ́tíwọ́ọ̀kì kan ń yí àwọn lẹ́tà padà sí ìgbì ohùn tààrà.");
// out.audio → Float32Array waveform (mono)
// out.sampling_rate → 16000
// Run it again with the same text → a slightly different waveform (stochastic duration).
This page runs the pipeline inside a Web Worker so synthesis never blocks the interface, encodes the
returned Float32 samples to a WAV blob for the <audio> element, and draws the same
samples as the waveform under "See inside". The English demo is the same call
with a different checkpoint (mms-tts-eng). The Yoruba tokenizer is
is_uroman:false, so the tone-marked Yoruba text (with ẹ/ọ/ṣ and the tone accents) is
tokenised directly — no romanisation step.