โ† All models

text-to-speech ยท audio ยท WASM ยท ~38 MB

MMS-TTS Arabic โ€” end-to-end Arabic speech, one network

This is the Arabic checkpoint of Meta's MMS-TTS family โ€” a distinct model from the built English, German and Spanish MMS-TTS demos: its own Arabic character vocabulary and its own Arabic-trained VITS weights, so it speaks the Arabic script (right-to-left) that the other checkpoints cannot. 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 Arabic sentence comes out with slightly different rhythm every time.

At a glance

ModelXenova/mms-tts-ara (ONNX of facebook/mms-tts-ara)
Task / pipelinetext-to-speech โ€” VitsModel, Arabic text tokens โ†’ 16 kHz waveform
ArchitectureVITS: conditional VAE + normalizing-flow decoder + monotonic alignment + stochastic duration predictor. End-to-end โ€” no separate vocoder.
LanguageArabic (ara) โ€” one of 1000+ MMS languages, each its own checkpoint. Right-to-left script.
OutputA mono Float32Array waveform at sampling_rate 16000
Quantizationq8 (8-bit) ONNX (model_quantized.onnx) โ€” verified real non-silent Arabic audio
BackendWebAssembly (WASM) โ€” runs anywhere; no WebGPU needed
Download~38 MB, 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 some Arabic 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 Arabic 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

An Arabic 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. Arabic is spoken by hundreds of millions of people yet is under-served by small offline voices โ€” MMS is the model you reach for when you need Arabic speech everywhere, offline, privately.

Use cases

Basics

Type an Arabic line, hear it, see its waveform โ€” the core move.

Practical

An Arabic narrator: read a notification, a weather report or an article snippet aloud.

Wild

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

Multi-model

A multilingual toxicity gate in front of the voice โ€” only clean Arabic text gets spoken.

How the API works

MMS-TTS Arabic is a one-liner with the text-to-speech pipeline โ€” the Arabic checkpoint is picked by its id:

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

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

const out = await tts("ู…ุฑุญุจุง ุจูƒู… ููŠ ู‡ุฐุง ุงู„ุนุฑุถ ุงู„ุชูˆุถูŠุญูŠ.");
// 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 German demo is the same call with a different checkpoint (mms-tts-deu).

References