Kokoro text to speech on a Raspberry Pi 5, about twice as fast on the same CPU. The point of the exercise is that you cannot hear the difference — so here it is to listen to.
github.com/zreecespieces/kokoro-pi
All produced on one Raspberry Pi 5 with the voice af_heart,
on held-out text the int8 calibration never saw. Upstream is the published Kokoro
ONNX export. Float adds graph rewrites and a native Snake kernel — 1.35×, and
identical to 115 dB. int8 adds the fused convolution kernel and is the default
build: 1.83× on the vocoder, and what you are listening for is whether it costs
anything.
Good evening, Maya.
On Tuesday, the museum opens at nine and closes shortly after sunset.
When the afternoon meeting ended, Elena reviewed every note, corrected the final schedule, and sent a clear summary to the volunteers who would arrive early the following morning.
These are 64 kbit MP3s so the page loads on a phone; the originals are 24 kHz WAVs in samples/. In a blind listen over all six held-out utterances, none of the builds was distinguishable from the float engine, which is why the default is the fastest one. The measured gap is 2.2 dB log-spectral distance against a floor of roughly 1 dB for any change at all — why that is the right measure.
| Setup | First audio | Full passage | Realtime factor |
|---|---|---|---|
Kokoro on PyTorch — a plain pip install | 10.45 s | 20.13 s | 1.54 |
| Kokoro + ONNX Runtime, upstream export | 12.02 s | 12.02 s | 0.98 |
| + graph rewrites and the Snake kernel | 10.41 s | 10.41 s | 0.85 |
| + the fused int8 kernel | 5.47 s | 5.47 s | 0.45 |
| + clause streaming — the default | 1.59 s | 5.90 s | 0.51 |
One paragraph, about 12 seconds of speech, measured over HTTP so the numbers include everything a client waits for. Realtime factor under 1.0 is faster than speech. Full benchmarks, including a comparison against Piper and Kokoro-FastAPI on the same machine.
| Engine | Phrase | Sentence | Paragraph |
|---|---|---|---|
| kokoro-pi | 0.49 | 0.48 | 0.37 |
| Kokoro-FastAPI — the same model, PyTorch | 1.86 | 1.38 | 1.39 |
Piper, en_US-lessac-medium | 0.12 | 0.13 | 0.14 |
Realtime factor on one Raspberry Pi 5, every engine resident, measured the same afternoon. 3.4–3.8× faster than the popular Kokoro server — the difference between not keeping up with speech and running at three times speech. And 2.6–3× slower than Piper, which is a smaller model doing a cheaper job and is excellent at it. Both are now comfortably faster than speech, which is the point: on this hardware the choice stops being about speed and starts being about how the voice sounds. The players above are how you decide.
curl -fsSL https://raw.githubusercontent.com/zreecespieces/kokoro-pi/main/install.sh | bash
curl -s http://127.0.0.1:8080/v1/tts -H 'Content-Type: application/json' \
-d '{"text":"Hello from my Raspberry Pi."}' | aplay -q -r 24000 -f S16_LE -c 1 -
It speaks the OpenAI speech API and the Wyoming protocol as well, so Open WebUI and Home Assistant need a URL and nothing else.