The first CPU that people successfully ran Kokoro TTS on for real-time speech was released twelve years ago. That’s not a typo. A 2013-era desktop chip can synthesize a natural-sounding voice locally, offline, with no GPU.
That fact is what pushed a resurfaced March 2026 walkthrough to 303 points on Hacker News in July 2026, anchored around Ariya Hidayat’s original guide. Worth knowing before you get excited: the July HN excitement was a guide resurfacing, not a v2 launch. If you show up expecting a new release, you’ll be disappointed. If you show up to actually use it, you’re in for a good afternoon.
What you’re actually installing
82M parameters, Apache 2.0 license, ships 54 voices across 8 languages, outputs 24 kHz audio. That’s the spec sheet. The more interesting fact: at v0.19 launch, it ranked #1 on the TTS Spaces Arena, beating models 14x its size – including Fish Speech at 500M parameters. Apache 2.0 means you can ship it in a commercial product without asking anyone.
Under the hood it’s StyleTTS 2 + ISTFTNet, decoder-only, built on top of yl4579/StyleTTS2-LJSpeech. (StyleTTS 2 has its own research lineage if you want to go deeper on the architecture.) The training story is almost absurd: turns out the entire run cost roughly $400 – about 500 A100 GPU-hours at $0.80/hr, as of early 2025, under 20 epochs, less than 100 hours of curated audio. Four hundred dollars. That’s the total bill for a model that outperforms systems trained on a million hours of audio.
Before you download anything: hexgrad’s model card explicitly warns that kokorottsai.com and kokorotts.net are likely scam sites. The real weights live only at huggingface.co/hexgrad/Kokoro-82M. Anywhere else asking for your email or credit card is not the project.
The five-line install (pip path)
Three ways to run Kokoro locally. Start with pip.
pip install "kokoro>=0.9.2" soundfile
# Debian/Ubuntu:
sudo apt-get install espeak-ng
# macOS:
brew install espeak-ng
Then, from the official model card:
from kokoro import KPipeline
import soundfile as sf
pipeline = KPipeline(lang_code='a') # 'a' = American English
text = "Kokoro runs locally on your CPU. No cloud, no API key."
generator = pipeline(text, voice='af_heart')
for i, (gs, ps, audio) in enumerate(generator):
sf.write(f'out_{i}.wav', audio, 24000)
One gotcha that will bite you on a fresh machine: Python 3.13+ is not supported (as of early 2025 – check the README before installing). Core dependencies misaki and numpy<2.0 don’t publish wheels for 3.13 yet. If your default Python is too new, create a venv with 3.12 explicitly (python3.12 -m venv venv). This is the number-one silent failure in Kokoro installs.
Two other paths, and when each wins
| Path | Command | Best for |
|---|---|---|
| Kokoro-FastAPI | docker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu |
OpenAI-compatible endpoint drop-in |
| Kokoro.js (browser) | npm i kokoro-js |
Static site, no server, WASM inference |
| ONNX + q8 | onnx-community/Kokoro-82M-v1.0-ONNX | Mobile, edge, quantized deployments |
Kokoro.js – launched January 16, 2025 by Xenova – runs inference 100% locally in the browser via WASM, powered by Transformers.js. If you’ve ever wanted a fully offline read-aloud button on a static site, this is now a real option. The ONNX build keeps output quality high even at q8; the model card calls it “resilient to quantization.” Available dtypes are fp32, fp16, q8, q4, and q4f16 – q8 is a sensible default. One trade-off the Docker container hides: Kokoro-FastAPI bundles the voice weights in the image, which is why it lands at roughly 5 GB. If you want a leaner image, you’ll fetch voices at runtime with Speaches instead – but that route also pulls in Whisper for STT, so pick your trade-off.
Where most tutorials stop, and where the pain begins
Single words sound terrible. Nobody warns you about this until you’ve already shipped.
A Hacker News commenter put it plainly: “Try having it say simply ‘six’ and it almost always says something like ‘ah-six-ah’. I found a way around that though. If you give it a longer sentence to say (e.g. ‘The word is: six’) it will say it fine.” Real thing, not an edge case. If you’re building a vocabulary trainer, a pronunciation app, or anything that reads isolated tokens, plan for it now. The fix: wrap the word in a sentence, then crop just the word you need using the timestamp data Kokoro returns with each audio generation.
The catch: length limits hit harder than you’d expect. Max input is around 500-510 tokens per pass; the NVIDIA ONNX model card recommends splitting into 100-200-token chunks. Feed it a full article in one call and you’ll get either truncated audio or, on some setups, a crash – M2 Pro users have reported hard crashes on big paragraphs, and chunking usually fixes it. Chunk on sentence boundaries. Not character counts. It sounds obvious. People still don’t do it.
Performance and what “good enough” actually sounds like
- Output: 24 kHz mono
- Throughput: roughly 1,000 input characters ≈ 1 minute of audio (per hexgrad’s model card)
- API cost sanity check (as of April 2025): under $1 per million characters of text input, under $0.06 per hour of audio output – useful for pricing what your local CPU is replacing
- Arena ranking: #1 on TTS Spaces Arena at v0.19 launch, beating models 14x its size
Is it ElevenLabs? No. Prosody is a hair flatter, and emotional inflection is limited. But for narration, documentation read-alouds, accessibility tooling, and edge devices that need to talk – it clears the bar cleanly. Read a paragraph aloud once and you stop noticing the model. That’s a reasonable definition of good enough.
When Kokoro is the wrong tool
Voice cloning isn’t on the menu. Kokoro reproduces from its fixed voice set – it won’t mimic a reference speaker from a clip. If that’s the requirement, you need a different model entirely. Same story for heavy code-switching mid-sentence across languages: community reports suggest dedicated multilingual models handle that better. And if the requirement is sub-100ms first-token latency for a real-time voice agent on cold start, a purpose-built streaming stack will feel snappier – Kokoro’s first-token latency is fine, not exceptional.
The honest positioning, from the model card: Kokoro sits in the sweet spot for natural, commercial-friendly, GPU-free speech. Outside that sweet spot, use something else.
FAQ
Do I need a GPU?
No. That’s the whole point.
Can I use Kokoro in a commercial product without paying?
Yes – Apache 2.0. Concrete example: ship a paid desktop app that reads PDFs aloud, bundle the ONNX q8 build, owe nobody a cent, as long as you keep the Apache license text in your attributions. Real weights are on Hugging Face under hexgrad; the license file is right there in the repo.
Which voice should I start with?
Try af_heart or af_bella – they’re the most tested and what the model card demos use. Once you’ve heard them, the pipeline exposes a method to list all available voices; cycle through the other 50-plus to find one that matches your project’s tone. For uncommon names or technical terms that come out garbled, that’s your cue to look at the misaki G2P library and its custom phoneme syntax (/kˈOkəɹO/-style overrides). That’s where Kokoro stops being a demo and starts being a tool.
Next step: Open a terminal, create a Python 3.12 venv, and run the five-line install above. Generate one WAV of your own name. If the pronunciation is off – for uncommon names it often is – that’s the misaki rabbit hole waiting for you.