Kokoro FastAPI
Kokoro FastAPI is a Docker image that serves the Kokoro text-to-speech model through an endpoint shaped like OpenAI's speech API, so the OpenAI SDKs work against it with a base URL change. Kokoro is an 82-million-parameter model with Apache-2.0 weights covering nine languages. The server streams audio, mixes preset voices, and runs on a CPU. It does not clone voices.
What does Kokoro FastAPI do?
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.
Key facts
- Serves Kokoro-82M, an 82-million-parameter model whose weights on Hugging Face are Apache-2.0; the wrapper's own code is Apache-2.0 too.
- Languages listed in the README: English (US and GB), Spanish, French, Hindi, Italian, Japanese, Brazilian Portuguese and Mandarin Chinese.
- OpenAI-compatible speech endpoint on port 8880, with streaming to a file or to speakers at 24,000 Hz.
- Output formats: mp3, wav, opus, flac, aac and pcm.
- Voice mixing by weighted combination, SSML support, per-word or per-chunk caption timestamps, and phoneme endpoints.
- Prebuilt images for CPU, NVIDIA CUDA in three versions, and an experimental AMD ROCm build (Linux amd64 only); Apple Silicon works when run directly with uv rather than through the GPU image.
- The README's 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.
- A Helm chart and hosting guides are linked; no hosted service is sold by the maintainers.
What does it replace, and where does it fall short?
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 does Kokoro FastAPI run?
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 is Kokoro FastAPI for?
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.
What limits does the README state?
"Artifacts in intonation can increase with smaller chunks." ROCm is Linux amd64 only. Results with the espeak-ng fallback "have varied".
Questions people ask
Is Kokoro open source?
Yes. Kokoro FastAPI is Apache-2.0, the hexgrad/kokoro inference library is Apache-2.0, and the Kokoro-82M weights on Hugging Face are Apache-2.0. The model card says training used permissive or non-copyrighted audio. Everything a product needs is on the OSI approved list.
Can Kokoro be used commercially?
Yes. Apache-2.0 on the code and on the weights permits commercial use, modification and redistribution with attribution. The README says the Apache-licensed weights let Kokoro be deployed anywhere from production environments to personal projects, and nobody sells a hosted version you would need to buy.
Does Kokoro FastAPI need a GPU?
No. There are CPU images, and the README quotes under a second to first audio on an Apple M3 Pro and about 3.5 seconds on an older Intel i7. GPU images exist for NVIDIA CUDA and, experimentally, AMD ROCm. On Apple Silicon you run it directly rather than through the GPU image.
How does Kokoro compare with ElevenLabs?
Kokoro gives you nine languages of preset voices behind an API on your own server, with no per-character bill and a licence that permits any use. ElevenLabs claims 70+ languages and clones voices; Kokoro does not clone. The open-source alternatives to ElevenLabs page puts it beside Chatterbox, which does clone under MIT.
Can Kokoro clone my voice?
No. Kokoro ships preset voices and a mixing feature, and the README is direct about it: "A tuner, not a cloner: expect the same neighbourhood, not a match. Only tune voices you have permission to use." For cloning under a commercial licence, see Chatterbox.
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.
Compared with the others
On the open-source alternatives to ElevenLabs page, Kokoro FastAPI is the pick for a speech api on your own server. Apache-2.0 code and weights around the 82-million-parameter Kokoro model, served through an OpenAI-compatible endpoint with streaming, in Docker images for CPU and NVIDIA.
Also on that page: Chatterbox for voice cloning you can ship, Piper for small devices and offline assistants, Fish Speech for expressive cloning, non-commercial.
More text to speech and voice cloning
An AGPL-3.0 desktop workflow engine for voice cloning, voice design, video dubbing, dictation and audiobooks, running 16 speech engines and 10 transcription engines locally, with a local API and an MCP server for agents.
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.
Tencent Hunyuan's 1.5-billion-parameter speech foundation model under MIT for code and weights, covering zero-shot text to speech, speech editing, enhancement and separation through one natural-language instruction interface.
Added September 16, 2026. Every claim above comes from the project's README, LICENSE or model card, read on September 16, 2026, or from the GitHub API on the date shown in the panel. Found an error? Write to reveneau@licheo.com and it is fixed in the next weekly pass. Repository: github.com/remsky/Kokoro-FastAPI.
Want Kokoro FastAPI running on your own servers?
Reveneau sets it up on your hardware, connects it to your product, and builds the software around it.