Leokani-tts 500K
1.1 MB text-to-speech for microcontrollers
2 min readupdated
A compact 0.52M-parameter TTS (text-to-speech) model from Milliwatt Labs that synthesizes English speech on low-power CPUs and microcontrollers without a GPU or cloud connection. It features a single female voice, Dala, trained on synthetic data from Kokoro-82M. Unlike larger models in the lineup (4.5M and 7M) or heavier alternatives like Piper and KittenTTS, this release runs faster than real time even on ESP32 chips. It is a great fit for smart home developers, standalone gadgets, and embedded systems.
Key features
- Ultra-small footprint: 2.1 MB in fp32, or just 1.1 MB in quantized fp16 and int8 builds, outputting 24 kHz mono audio.
- Microcontroller-ready: hits 3.6× real-time speed with a 30 ms startup latency on an ESP32-P4, and 1.93× on an ESP32-S3.
- Self-contained runtime: supports PyTorch and ONNX Runtime, while a built-in Leokani G2P phonemizer removes the need for external dependencies like espeak-ng.
- Speed control and watermarking: adjust speaking pace via the
--speedflag, with an inaudible author watermark embedded directly into the audio.
What you can do
- Local voice assistants: build spoken responses and alerts into smart home devices running on an ESP32 or Raspberry Pi.
- Offline voice interfaces: add audio prompts to air-gapped kiosks, robots, and portable electronics without internet access.
- Lightweight server microservices: run fast speech generation on a single CPU thread (up to 67× faster than real time on an Arm Cortex-A725 core).
Example
pip install onnxruntime
python leokani_onnx.py "No espeak-ng needed." --g2p leokani -o g2p.wav
python leokani_onnx.py --int8 "Same voice, a smaller file." -o int8.wav
Read more
DetailsSingle-thread Arm Cortex-A725 (2.8 GHz) benchmarks: 67× real-time speed, 62 ms time-to-first-audio, 0.55% WER, and 1.88 UTMOS.
Limitations: English only with a single neutral voice; struggles with uncommon names, occasionally introduces mild reverb, and reads symbols literally ("$219" must be written out as "219 dollars").
License: Milliwatt Labs Model License 1.0 (free after registration for organizations with under $1M in annual revenue).










Comments