Kokoro FastAPI
A Docker image that serves the 82-million-parameter Kokoro model through an OpenAI-compatible speech endpoint, with streaming, voice mixing and nine languages, all under Apache-2.0.
What it does
Kokoro FastAPI wraps the Kokoro-82M text-to-speech model in a server that speaks the same API shape as OpenAI's speech endpoint, so the OpenAI SDKs work against it with a base URL change. The README describes it as a "Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model" that can "generate hours of high quality speech in minutes".
The model itself is small: 82 million parameters, with weights on Hugging Face under Apache-2.0 and an inference library at hexgrad/kokoro under the same licence. The README lists English (US and GB), Spanish, French, Hindi, Italian, Japanese, Brazilian Portuguese and Mandarin Chinese.
The server streams audio, outputs mp3, wav, opus, flac, aac and pcm, supports SSML, returns per-word or per-chunk caption timestamps, and can mix preset voices by weight. There is an optional web interface with read-along highlighting.
What it replaces
It replaces ElevenLabs for a team that wants an HTTP speech API on its own hardware with preset voices and a permissive licence. Both the code and the weights are Apache-2.0.
Where it falls short: Kokoro does not clone voices. The README is direct about the mixing feature: "A tuner, not a cloner: expect the same neighbourhood, not a match." Nine languages against ElevenLabs' claimed 70+.
How it runs
Prebuilt Docker images for CPU, NVIDIA CUDA (three CUDA versions) and an experimental AMD ROCm build, or docker compose, or a direct run with uv and the start scripts. It listens on port 8880. Apple Silicon works when run directly rather than through the GPU image, which the README says "won't run on Apple Silicon". A Helm chart and hosting guides are linked.
The README gives its own first-token latency figures: about 300 milliseconds on a GPU, under a second on an M3 Pro CPU, and about 3.5 seconds on an older i7 CPU. Those are the project's measurements, not this site's.
Who it fits
A team replacing a per-character speech bill with a container it runs, whose product needs preset voices rather than a clone of a specific person. Anyone who needs voice cloning should look at Chatterbox, Fish Speech or F5-TTS on the same list.
Limits the README states
"Artifacts in intonation can increase with smaller chunks." ROCm is Linux amd64 only. Results with the espeak-ng fallback "have varied".
Sources
- Kokoro FastAPI README and LICENSE: github.com/remsky/Kokoro-FastAPI, read 2026-09-16.
- Kokoro-82M model card, Apache-2.0 weights: huggingface.co/hexgrad/Kokoro-82M, read 2026-09-16.
- Kokoro inference library: github.com/hexgrad/kokoro, read 2026-09-16.
More text to speech and voice cloning
A multilingual text-to-speech system with voice cloning from a 10 to 30 second clip and inline emotion tags, released with its weights under a research licence that requires a separate agreement for commercial use.
A family of text-to-speech models from Resemble AI under MIT, with zero-shot voice cloning from a reference clip and a multilingual model covering 23 languages.
A research text-to-speech model with zero-shot voice cloning whose code is MIT but whose pretrained weights are non-commercial, because of the dataset they were trained on.
A fast, local neural text-to-speech engine maintained by the Open Home Foundation, used by Home Assistant and the NVDA screen reader, under GPL-3.0.
Added September 16, 2026. Found an error on this page? Write to reveneau@licheo.com and it gets fixed in the next weekly pass.
Running one of these inside your own environment, with your own data and your own security rules, is the kind of work Reveneau does. Read how a forward deployed engagement works.