Runs in the browser · Text to speech
Run Kokoro-82M in your browser
Kokoro-82M downloads 147.4 MB over WebGPU (q4f16), or 88.1 MB over WebAssembly (q8), to turn text into a spoken voice entirely in the tab with Transformers.js. No install, no server.
Text to speech · onnx-community/Kokoro-82M-v1.0-ONNX
- Parameters
- 82M
- Pipeline task
- text-to-speech
Reading
Sizes are not monotonic by quant here: q8 (about 88 MB) is smaller than q4f16 (about 147 MB) and is the community-standard build most demos ship. In practice Kokoro is usually driven through the dedicated kokoro-js package rather than a generic pipeline() call, and kokoro-js recommends the fp32 build on WebGPU: the q4f16 build produces audibly degraded audio there (verified in Chrome on Apple silicon, 2026-08-01).
The WASM build downloads smaller here: 88.1 MB (q8) against 147.4 MB (q4f16) for WebGPU. The CPU-fallback quant compresses tighter than the GPU pick for this model.
The quant ladder spans 3.5x: 88.1 MB (q8) to 310.5 MB (fp32).
Run it in your browser
Checking what this browser can run…
All measured variants
| Variant | Size |
|---|---|
| q8 WASM pick | 88.1 MB |
| q4f16 WebGPU pick | 147.4 MB |
| fp16 | 155.7 MB |
| uint8 | 169.2 MB |
| q4 | 291.1 MB |
| fp32 | 310.5 MB |
Sizes measured from the HuggingFace API file tree for onnx-community/Kokoro-82M-v1.0-ONNX, not estimated.
Use it with Transformers.js
import { pipeline } from "@huggingface/transformers";
const pipe = await pipeline("text-to-speech", "onnx-community/Kokoro-82M-v1.0-ONNX", {
device: "webgpu", // usually falls back to "wasm"; wrap in try/catch for production
dtype: "q4f16", // use "q8" for the WASM build
});
const result = await pipe(/* your input */);
Requires npm install @huggingface/transformers (or the CDN build).
Sources
Same job, different size
FAQ
WebGPU or WASM for Kokoro-82M, in practice?
Chrome, Edge, and Safari 26+ run the WebGPU build (q4f16) on the GPU. Firefox has WebGPU on Windows and Apple Silicon Macs but not everywhere yet. Any browser without a WebGPU adapter falls back automatically to the WebAssembly build (q8) on CPU: same model, slower to load, slower to run.
What does q4f16 mean for Kokoro-82M?
The WebGPU build here uses q4f16: 4-bit weights with some layers kept at 16-bit for stability: WebGPU's usual smallest clean build. The WASM fallback uses q8: 8-bit integers: about a quarter the size of fp32, with a smaller quality trade than 4-bit.
Sizes measured 2026-08-01 from the HuggingFace API. Last validated 2026-08-03. See all browser models or the methodology.