Kokoro shrunk to 3M parameters with a trick from old-school speech tech
A developer in Nairobi has boiled the popular text-to-speech model Kokoro-82M down to 3.27 million parameters and 13 MB. By his own measurements, it sounds almost the same and runs about 28 times faster. The secret is a principle from classic speech technology: at the audio level, there's no neural network anymore — just a pulse train, noise and filters.

What's going on
Kokoro-82M is one of the most popular open text-to-speech models. According to Hugging Face, it was downloaded around 13.9 million times last month. It sounds natural, is small at 82 million parameters and runs without a GPU. Mike Chumba, a developer in Nairobi, Kenya, has now shown that it can get a lot smaller. His model nano-edge-tts-standalone has 3.27 million parameters. The weights take up 13 MB instead of 327 MB. It's been available at huggingface.co/drmhse/nano-edge-tts-standalone since November 29, and almost nobody has noticed: the Show HN post on Hacker News got 10 points and not a single comment.
What stands out is less the number than how he got there. Chumba didn't just trim Kokoro. He replaced its most expensive component, the vocoder. That's the part of a speech model that turns an abstract description into an actual sound wave. In its place is a principle speech engineers have known for decades. At the audio level, his model runs no neural network at all.
Where Kokoro's 82 million parameters live
Kokoro builds on StyleTTS 2 and iSTFTNet, two research architectures for speech synthesis. Roughly speaking, the model has two halves. The text side turns phonetic transcription and a voice vector into a description of what's being said: per-phoneme features, phoneme duration, pitch and loudness. The decoder turns that into a 24 kHz waveform. According to Chumba's paper, 28.5M parameters sit on the text side and 53.3M in the decoder — about two thirds of the total.
Another distillation paper, Paradee by Sahil Mahendrakar, breaks it down further:
| Kokoro-82M component | Parameters | Share |
|---|---|---|
| Decoder: AdaIN blocks (1024 channels) | 33.6M | 41% |
| Decoder: iSTFTNet generator (vocoder) | 19.7M | 24% |
| LSTMs (text encoder, prosody) | 11.2M | 14% |
| ALBERT/PL-BERT incl. projection | 6.7M | 8% |
| Heads for pitch, energy, duration | 6.6M | 8% |
| Text encoder CNN, phoneme embedding | 4.0M | 5% |
The two decoder rows add up to exactly the 53.3M Chumba cites. The 19.7M for the vocoder itself also shows up independently, in the model card of the Kokoro offshoot af_heart_arm_tts ("19.69M"). So if you want to shrink Kokoro, the decoder is the place to start. Chumba tested this in two earlier stages. With compressed-kokoro, he only made the decoder narrower. Past a certain point, that produced a "hoarse whistle" between 2 and 3 kHz. Only swapping it out entirely delivered the big leap.
The trick: pulse train, noise, filter
The source-filter model goes back to Gunnar Fant and earlier Japanese work. It splits the voice into two parts. For voiced sounds like vowels, the source is a regular pulse train, like the flutter of the vocal folds. For fricatives like "s" or "f", it's white noise. The filter corresponds to the mouth and throat and shapes the source into the final sound. Classic LPC vocoders in speech coding work exactly this way.
nano-edge-tts adopts this idea and only lets small networks compute the filter settings:
- The mapper (0.96M parameters) runs 80 times per second and translates the text side's features into an internal representation.
- The renderer (0.79M parameters) runs 160 times per second. For each of the 301 frequency bins of the pulse train (25 ms window), it sets a gain and a phase rotation; for each of the 61 bins of the noise (5 ms window), it sets a gain.
- Two inverse STFTs build the sound wave from that. An STFT splits audio into short time slices and frequency components; the inverse STFT puts them back together using fixed math with no learned weights.
The config confirms the key specs: FFT size 600, hop 150, which means 160 frames per second at 24 kHz. A vocoder is normally expensive because it generates 24,000 values per second with a network. Here, the networks run only 80 to 160 times per second — 150 to 300 times less often. Related approaches include Google Magenta's DDSP (2020) and the "Neural Source-Filter" models from Japan's NII, both of which the paper cites as inspiration.
The text side is new too, with 1.52M instead of 28.5M parameters. The clever bit: Kokoro's preprocessing already determines each word's part of speech, then throws that information away. Chumba passes it on to the small network. According to the paper, this gets word stress about as right as an encoder more than five times larger, with 8.2M parameters. The model also drops its dependency on espeak-ng, a GPL-licensed phonemizer. Pronunciations for 915,000 words ship precomputed, and a small network (g2p_en) guesses unknown words. At runtime, no Kokoro network and no espeak-ng code is executed. Kokoro served only as the teacher during training, using 91,812 sentences from public-domain Gutenberg books read in random voices. Training took about 22 hours on a single Apple GPU.
What the measurements say — and what they don't
All figures come from the author himself, measured on an Apple Silicon laptop using a single CPU thread:
| Metric | Kokoro-82M | nano-edge-tts-standalone |
|---|---|---|
| Parameters | 81.8M | 3.27M |
| Weights on disk | 327 MB | 13 MB |
| Incl. text preprocessing | 415 MB | 36 MB |
| Real-time factor (PyTorch / ONNX) | 0.1415 | 0.0050 / 0.0045 |
| Peak memory | 1.78 GB | 0.71 GB (ONNX: 0.60 GB) |
| Whisper errors, 60 new sentences | 36 | 35 |
| Hard target words correct | 81.8% | 78.9% |
| Word error rate (leaderboard sentences) | 0.66% | 0.69% |
| UTMOS (predicted naturalness, max. 5) | 4.51 | 4.465 |
Doing the math: at a real-time factor (RTF, compute time divided by audio duration) of 0.005, 45 seconds of speech take about 0.2 seconds to generate. Kokoro needs just over 6 seconds. In streaming mode, the first audio chunk should be ready after about 12 ms.
The model card itself lists several limitations:
- One listener. The author did all the listening tests alone. The blind comparison (0 wins, 22 ties, 2 for Kokoro) covered an intermediate version, not the released model.
- Apples and oranges. Kokoro's leaderboard scores are the published ones, measured on different hardware. Chumba generated his own scores locally and didn't officially submit them.
- Artifacts. The post-filter is a fixed, untrained processing step that sharpens the high frequencies. It introduces some "flutter" between 4 and 8 kHz and exaggerates contrast at 2 to 4 kHz.
- Prosody. Pitch deviates from Kokoro by 133 cents on average, while Kokoro varies against itself by only 39 cents. You might hear that in long, expressive passages.
- Rare names. For words not in the lists, the small network guesses less reliably than espeak-ng.
There are no independent tests yet. There are also no measurements for Raspberry Pi or smartphones; Chumba explicitly cites only his laptop. Our take: at 200x real time on a single laptop core, there should be plenty of headroom even on slower ARM cores. But that hasn't been shown.
What you need to try it
You don't need a GPU. The model is designed for a single CPU core, but it can also run on CUDA or an Apple GPU (mps). Peak usage is around 0.6 to 0.7 GB of RAM, mostly because of text preprocessing. That makes laptops, mini PCs or a Raspberry Pi viable; a microcontroller is out. One important note: the full repository is 698 MB because it includes all training checkpoints. Download only the files you need. Without PyTorch, using just ONNX Runtime, the model card gives these steps:
pip install onnxruntime safetensors numpy
hf download drmhse/nano-edge-tts-standalone --local-dir nano-tts-onnx --include onnx_tts.py --include nano_frontend.py \
--include config.json --include voices.safetensors --include "frontend/*" --include "onnx/text_*" --include "onnx/decoder*"
cd nano-tts-onnx && python onnx_tts.py "Hello from a very small model." --voice af_heart --out hello.wav
With PyTorch, you also get streaming and batch processing (tts.stream(), tts.batch()). The voices are named as in Kokoro: af_*/am_* for American, bf_*/bm_* for British.
The small Kokoro family compared
nano-edge-tts isn't alone. Several mini offshoots of Kokoro have appeared since the fall:
| Model | Parameters | Size | Voices / languages | License | Notable |
|---|---|---|---|---|---|
| nano-edge-tts-standalone | 3.27M | 13 MB | 28 / English | Apache 2.0 | Pulse train + noise, no network at the audio level |
| Paradee-8M | 8.07M | approx. 9 MB (int8) | 1 / English | Apache 2.0 | Narrower Kokoro architecture, UTMOS 4.41 |
| Leokani-tts 7M | 7M | 7.8 MB (int8) | 1 / English | CC BY-NC 4.0 | ESP32-P4 at approx. 1.1x real time |
| kale-tts-1 nano | 7.5M | n/a | English | Apache 2.0 | Also sine harmonics + noise |
| af_heart_arm_tts | n/a (vocoder 3.76M) | 68.5 MB | 1 / English | Apache 2.0 | VITS, built for Arm CPUs |
| sanoTTS | approx. 0.1–2.27M | 337 KB–8.7 MB | 31 / 17 languages incl. German | GPL-3.0 (runtime MIT) | Runs on an ESP32-S3 costing about $3 |
sanoTTS takes the opposite approach. It speaks German (1.57M parameters, 9.9% word error rate on Tatoeba sentences) and, according to the project, reaches a real-time factor of 0.383 on an ESP32-S3. You can try it in your browser at tts.ampixa.com/sanoTTS. Because it uses espeak-ng, it's licensed under the GPL. Its figures vary by source: for the smallest voice, heart-nano, the Hugging Face page lists 104,215 parameters and a leaderboard UTMOS of 3.88, while the GitHub table gives roughly 0.29M parameters and a UTMOS of 2.45 on its own test set. The models' quality scores come from different test sets, so they aren't directly comparable.
The bigger picture
Our take: nano-edge-tts is the most radical answer yet to the question of how much of Kokoro you actually need. Paradee shrinks Kokoro's architecture, and sanoTTS bets on tiny single voices. Chumba, by contrast, keeps all 28 voices and drops neural computation at the audio level entirely. kale-tts landed on a similar idea at the same time — sine harmonics plus noise — which suggests a pattern is emerging. For read-aloud apps, smart home announcements or browser projects, an Apache-licensed 13 MB model with no GPL dependency is an attractive option.
The weak spot is the evidence. All the numbers come from the author, the listening tests come from a single person, and there are no measurements on a Pi or a phone. If you need German, this model isn't for you yet — and not just because of missing training data: Kokoro itself has no German voice. The approach does seem to carry over to other languages, though. Chumba has already followed up with a Swahili version, nano-edge-tts-swahili-3M, which has 2.7M parameters and, according to its model card, speaks about 190 times faster than real time. Whether a German version could be built is an open question. It would need a German-speaking teacher model or original recordings.
Sources
- Hugging Face: drmhse/nano-edge-tts-standalone (Modellkarte) huggingface.co
- Paper-Quelltext: Distilling Kokoro-82M into a 3.3M-Parameter TTS Model huggingface.co
- config.json von nano-edge-tts-standalone huggingface.co
- Hugging Face: drmhse/nano-edge-tts (nur Decoder) huggingface.co
- Hugging Face: drmhse/compressed-kokoro huggingface.co
- Hugging Face: drmhse/nano-edge-tts-swahili-3M huggingface.co
- Website des Autors (drmhse.com) drmhse.com
- Hugging Face: hexgrad/Kokoro-82M huggingface.co
- Kokoro VOICES.md huggingface.co
- arXiv: Paradee – Distilling Kokoro-82M into an 8M-Parameter Model arxiv.org
- Hugging Face: Paradee-8M-v1.0 huggingface.co
- Hugging Face: ampixa/sanoTTS huggingface.co
- GitHub: Ampixa/sanoTTS github.com
- Hugging Face: dlyog/af_heart_arm_tts huggingface.co
- Leokani-tts 7M: Tiny TTS Now Runs on an ESP32 artrealmai.com
- GitHub: mlx-audio PR #1230 (kale-tts-1) github.com
- Wikipedia: Source–filter model en.wikipedia.org
Ask the AI assistant
Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.
The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.
Comments
What do you think? Already tried it? Write it here, no sign-up needed.
Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.