Self-host Kokoro FastAPI
v0.10.0OpenAI-compatible text-to-speech API with web player
docker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:latest- Stars
- 5 676
- RAM
- 4gb
- Port
- 8880 (HTTP server for the API, OpenAPI docs and web player)
ghcr.io/remsky/kokoro-fastapi-cpuWhat is Kokoro FastAPI?
Kokoro-FastAPI wraps the Kokoro-82M speech model in a Dockerized FastAPI server that answers OpenAI's audio/speech calls, so any OpenAI-compatible client can produce audio locally. Eight languages ship in the box: US and British English, Brazilian Portuguese, Mandarin Chinese, Japanese, Spanish, French, Hindi and Italian. Voices can be mixed in weighted ratios, switched mid-text with inline [voice:] tags, or tuned from a short reference clip, and SSML markup is translated into the server's own control tokens for pauses, pacing and pronunciation. Responses come back as mp3, wav, opus, flac, aac or pcm, streamed or whole, with per-word or per-chunk timestamps that drive read-along captions; separate routes convert text to phonemes and turn phonemes back into audio. An optional browser player lives at /web next to the OpenAPI docs at /docs. Operators run it with docker run, docker compose, a Helm chart for Kubernetes, or directly through uv, using CUDA images, an experimental ROCm build, or MPS on Apple Silicon. The API has no authentication of its own, so on a public host anyone who can reach the port can use the interface and API freely; the DigitalOcean guide recommends adding a firewall. The /v1 routes are the stable surface, while /dev and /debug helpers ship disabled and can change or hide behind a flag in any minor version.
Kokoro FastAPI alternatives
wyoming-piperSelf-hosted Wyoming protocol server for Piper TTS, providing neural text-to-speech for Home Assistant and Wyoming clients. Open-source, runs locally via Docker or Python.Comparewyoming-piper with Kokoro FastAPI
whisper-api-serverA self-hosted, open-source transcription server that implements the OpenAI Whisper API locally using faster-whisper for efficient speech-to-text conversion.Comparewhisper-api-server with Kokoro FastAPI
SpeakrSelf-hosted, open-source AI transcription platform with speaker diarization, LLM summaries, semantic search across recordings, and OIDC multi-user support.CompareSpeakr with Kokoro FastAPI
OmniVoice-StudioThis self-hosted, open-source ElevenLabs alternative clones and designs voices, dubs video and builds audiobooks in 646 languages, fully local on desktop or Docker.CompareOmniVoice-Studio with Kokoro FastAPI
whisper-asr-webserviceSelf-hosted, open-source speech-to-text webservice wrapping OpenAI Whisper, Faster Whisper and WhisperX behind a REST API with Swagger docs.Comparewhisper-asr-webservice with Kokoro FastAPI
TLDR RadioSelf-hosted, open-source tool that converts daily TLDR tech newsletters into chapterized audio using local TTS (Kokoro-82M), no cloud or accounts needed.CompareTLDR Radio with Kokoro FastAPI
Breeze TTS 2Self-hosted open-weight TTS model with voice cloning, design from descriptions, and voice direction. Streaming REST API and CLI for real-time synthesis on NVIDIA GPUs.CompareBreeze TTS 2 with Kokoro FastAPI
unspeechunSpeech is a self-hosted, open-source TTS proxy with an OpenAI-compatible API for multiple cloud providers like ElevenLabs, Azure, and Deepgram.Compareunspeech with Kokoro FastAPI
Should you self-host Kokoro FastAPI?
Kokoro FastAPI scores 69/100 on selfhost.directory (how scoring works) and ranks #4 of 9 in Text to Speech. It has 5 676 GitHub stars, +153 in the last 30 days.
It shipped 16 stable releases in the past year. The latest, v0.10.0, came out on 8 November 2026. New versions land roughly every 9 days.
Setup is easy: most people get it running in one sitting. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Python.
Its closest alternative on selfhost.directory is OmniVoice-Studio (91/100, 109 520 stars). It scores higher overall, so compare the two before you pick. See Kokoro FastAPI vs OmniVoice-Studio side by side.
Features
- Automatic sentence chunking
- Built-in web player
- GPU acceleration (CUDA, ROCm, MPS)ROCm build is experimental and amd64 only
- Inline control tokens
- Model unload and VRAM reclaimBehind ALLOW_DEV_UNLOAD=true
- Multi-language text-to-speech
- Multiple output audio formats
- Multi-speaker dialogue generation
- OpenAI-compatible speech endpoint
- Phoneme routes
- Response streamingArtifacts in intonation can increase with smaller chunks
- SSML inputMarked experimental in the README
- Timestamped Captions
- Voice mixing and aliases
- Voice tuning from a reference clipExperimental, off by default (ENABLE_INNO_TUNER=true); a tuner rather than a full cloner
Models for Kokoro FastAPI
Open-weight models you can plug into Kokoro FastAPI, most popular first.
More in Text to Speech
kokoro-webKokoro Web is a self-hosted, open-source AI voice generator with OpenAI-compatible API and browser UI for natural speech in multiple languages.
OmniVoice-StudioThis self-hosted, open-source ElevenLabs alternative clones and designs voices, dubs video and builds audiobooks in 646 languages, fully local on desktop or Docker.
openai-edge-ttsA self-hosted, open-source text-to-speech API server that mimics OpenAI's /v1/audio/speech endpoint and synthesizes audio for free via Microsoft Edge's TTS voices.
OpenReaderA self-hosted open-source document reader that speaks EPUB, PDF, DOCX, text, and Markdown files aloud with word-level highlighting and audiobook export.
unspeechunSpeech is a self-hosted, open-source TTS proxy with an OpenAI-compatible API for multiple cloud providers like ElevenLabs, Azure, and Deepgram.
wyoming-piperSelf-hosted Wyoming protocol server for Piper TTS, providing neural text-to-speech for Home Assistant and Wyoming clients. Open-source, runs locally via Docker or Python.
airunnerSelf-hosted, open-source desktop AI engine: local LLM chat companions, Stable Diffusion art generation, TTS/STT voice, and a headless Ollama/OpenAI-compatible API.
audiobook-studioSelf-hosted open-source app for producing audiobooks locally using XTTS voice cloning, with optional Voxtral cloud voices. Multi-voice, segment repair, chapter assembly
Breeze TTS 2Self-hosted open-weight TTS model with voice cloning, design from descriptions, and voice direction. Streaming REST API and CLI for real-time synthesis on NVIDIA GPUs.
chatterbox-tts-apiChatterbox TTS API is a self-hosted, OpenAI-compatible TTS server with voice cloning and 22-language support. Runs via Docker or Python, integrates with Open WebUI.
ebook2audiobook---LegacySelf-hosted, open-source converter that turns ebooks and PDFs into audiobooks using multiple TTS engines, voice cloning, OCR and 1158 languages.
Fish SpeechSelf-hosted text-to-speech toolkit with voice cloning, multi-speaker scripts and inline emotion tags, plus a TTS API server and WebUI in CUDA or CPU Docker images.


0 comments