Kokoro-82M Shrinks to 86MB and Runs Free TTS in Any Browser
An 82M parameter text-to-speech model now ships in ONNX with quantizations down to 86MB, running in browsers via Transformers.js.
ProTakeaways
- ONNX Community shipped Kokoro-82M v1.0 in ONNX with 8 quantization levels down to 86MB.
- 82M-parameter StyleTTS 2 based model, Apache 2.0 licensed, 24kHz output, 512 token context.
- Runs in the browser through Transformers.js and the kokoro-js npm package.
- Includes 28 English voices split across American and British male and female speakers.
- Topped the TTS Spaces Arena at launch despite being far smaller than rivals.
- Over 1.2 million downloads on Hugging Face, trained originally for around $1,000 in compute.
A tiny text-to-speech model that keeps outperforming its weight class just got easier to deploy. The Kokoro-82M v1.0 ONNX release from the ONNX Community packages the model into formats that run in the browser, in Node, or on a CPU with ONNX Runtime, with quantized variants dropping the footprint under 100MB. It has crossed 1.2 million downloads, putting it among the most heavily used open TTS checkpoints on Hugging Face.
Kokoro itself is not new, but the ONNX packaging is what makes this version practical for shipping into real apps. The base checkpoint has 82 million parameters, is released under Apache 2.0, weighs about 327MB in full precision, runs fast on CPU, ships 54 voices across 8 languages, and outputs 24kHz audio. This repo focuses on the English voices and exposes eight quantization levels.
Punching above 82M params
People care about Kokoro because it punches far above its parameter count. In the TTS Spaces Arena, the model reached the top ranking, beating architectures with an order of magnitude more parameters and training data. Under the hood it borrows from StyleTTS 2 and ISTFTNet, using a decoder-only design with no diffusion.
The economics are equally striking. Support for 8 languages and 54 distinct voices came out of hundreds of hours of training data and roughly $1,000 in compute. The weights are permissively licensed for commercial use, which closes off the usual excuse for reaching for a paid API.
What ships in the ONNX drop
The repo exposes the model in a wide grid of precisions so you can pick your quality-vs-size trade-off. Quality holds up well under aggressive quantization, so the smallest builds remain usable for production speech synthesis.
| Variant | Size |
|---|---|
| model.onnx (fp32) | 326 MB |
| model_fp16.onnx | 163 MB |
| model_q4f16.onnx | 154 MB |
| model_uint8f16.onnx | 114 MB |
| model_quantized.onnx (int8) | 92.4 MB |
| model_q8f16.onnx (mixed) | 86 MB |
On the voice side, this build includes the English speaker set: 11 American female voices (af_heart, af_bella, af_nicole and others), 9 American male voices, 4 British female voices, and 4 British male voices. Sample rate is 24kHz and the context length is 512 tokens, so long documents need to be chunked.
Getting it running
The path of least resistance is the kokoro-js package, which wraps the ONNX runtime and voice selection into a two-line API. In-browser inference through Transformers.js is a first-class target, which is what makes shipping voice into a static web app realistic.
import { KokoroTTS } from "kokoro-js";
const tts = await KokoroTTS.from_pretrained(
"onnx-community/Kokoro-82M-ONNX",
{ dtype: "q8" } // fp32, fp16, q8, q4, q4f16
);
const audio = await tts.generate("Hello world.", { voice: "af_bella" });
audio.save("audio.wav");
For Python, the repo shows how to drive the raw ONNX session directly. You convert text to phonemes with misaki, map phonemes to token IDs, load a voice style vector from a .bin file, and pass input_ids, style, and speed tensors into InferenceSession.run.
Where it fits, and where it doesn't
Independent hands-on reviews converge on the same verdict. Kokoro is the strongest free, CPU-friendly open-source TTS you can run today, generating natural voiceovers on a laptop in seconds with no GPU and no subscription. It has real limits: no voice cloning (where XTTS v2 still wins), no lip-synced video, and lower raw throughput than Piper.
Practical places this model fits well:
- Client-side narration for reader apps, browser extensions, and accessibility tools where sending text to a paid API is a non-starter.
- Offline voice for desktop apps, Electron tools, and on-device assistants that need to work without a network.
- Audiobook and podcast drafts where the 54-voice roster covers most narrator styles.
- Cost-sensitive backends replacing per-character TTS billing with a fixed inference budget.
The broader signal is what reviewers have started calling the commoditization of voice. An 82MB checkpoint on a laptop now produces voiceovers good enough for real work, for free. If a product's only claim was that it does text-to-speech, that moat has closed. For anyone building on top of TTS rather than selling it, that is very good news.