← All models

text-to-speech Β· audio Β· WASM Β· ~38 MB

MMS-TTS β€” end-to-end speech, one network, many languages

MMS-TTS is a VITS model: a single, end-to-end network that turns text straight into a waveform β€” no separate vocoder stage. It's a different beast from Kokoro (a StyleTTS2 decoder) and SpeechT5 (encoder-decoder + HiFi-GAN): VITS is a conditional VAE with normalizing flows and a stochastic duration predictor, so the same sentence comes out with slightly different rhythm every time. This page runs the English checkpoint β€” one of 1000+ languages Meta released in the same family.

At a glance

ModelXenova/mms-tts-eng (ONNX of facebook/mms-tts-eng)
Task / pipelinetext-to-speech β€” VitsModel, text tokens β†’ 16 kHz waveform
ArchitectureVITS: conditional VAE + normalizing-flow decoder + monotonic alignment + stochastic duration predictor. End-to-end β€” no separate vocoder.
OutputA mono Float32Array waveform at sampling_rate 16000
Quantizationq8 (8-bit) ONNX
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~38 MB per language, cached after first load
LicenseCC-BY-NC 4.0 (MMS weights) β€” non-commercial
Web APIsWebAssembly, Web Workers, Web Audio (playback), Blob URLs, Canvas

Run it

Type something and press 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.

See inside β€” the waveform, and the stochastic duration predictor

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 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.

Speak something to see its waveform and stats.

Why it matters

VITS is the pragmatic workhorse of open TTS: one self-contained network, small, CPU-friendly, and β€” via MMS β€” available in more than a thousand languages from a single recipe. It won't out-act a big expressive model, but it's the model you reach for when you need speech everywhere, offline, with no per-character bill and nothing leaving the device.

Use cases

Basics

Type a line, hear it, see its waveform β€” the core move.

Practical

Multilingual: switch between languages and hear the same idea spoken in each.

Wild

Stochastic prosody lab β€” generate the same text many times and compare the timing.

Multi-model

Summarise a long passage with DistilBART, then have MMS read the summary aloud.

How the API works

MMS-TTS is a one-liner with the text-to-speech pipeline β€” pick the language by its checkpoint:

import { pipeline } from "@huggingface/transformers";

const tts = await pipeline("text-to-speech", "Xenova/mms-tts-eng", { dtype: "q8" });

const out = await tts("One network turns letters directly into a sound wave.");
// 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". Switch language by loading a different mms-tts-<iso> checkpoint β€” same call, same shape.

References