remsky /Kokoro-FastAPI
Dockerized OpenAI-compatible wrapper for Kokoro-82M text-to-speech w/multiplatform CPU, AMD, NVIDIA GPU PyTorch; multi-speaker, clone-tuning, caption timestamps, SSML, websockets, optional readalong web UI
★ 5,686⑂ 945👁 35⑃ 219● 298▤ 29
+4
Daily
5,686
stars
945
forks
35
watchers
219
prs
298
issues
29
releases
README
!FastKoko: Dockerized Kokoro-82M TTS, OpenAI-compatible API
Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model. Generate hours of high quality speech in minutes.
- OpenAI-compatible Speech + Realtime (TTS only) endpoints, multi-language support
- English (US/GB), Spanish, French, Hindi, Italian, Japanese, Brazilian Portuguese, Mandarin Chinese
- ElevenLabs and Cartesia compatible websockets for voice agents (LiveKit, Pipecat)
- Custom voicepacks via Inno Clone-Tuner
- Optional integrated WebUI; read-along long-generation
- Inline multi-speaker generation, weighted voice mixing with short aliases, SSML support
- Per-word, or per-chunk timestamped caption generation
- Phoneme endpoints: generate phonemes from text, or generate audio from phonemes
- Prebuilt multiplatform images
- CPU and NVIDIA GPU (CUDA): linux/amd64 + linux/arm64
- AMD GPU (ROCm, experimental): linux/amd64 only
- Apple Silicon (MPS) supported when running directly via UV (no image)
Integration & Guides
🌐Community projects that enable Kokoro-FastAPI as a backend
- Home Assistant
- wyoming_openai, openai_tts, Kokoro-TTS, Kokoro-FastAPI App
- App stores and templates
- Umbrel, Unraid Apps, GPUStack, jetson-containers
- Readers and audiobooks
- openreader, epub_to_audiobook, audiobook-creator, Zotero-OpenReader
- Assistants and agents
- xiaozhi-esp32-server, call-me, agent-cli, voice-chat-ai
- Browser
- kokoro-extension, customtts
Get Started
Quickest Start (docker run)
Pre-built multi-arch images with models baked in.
:latest is available, but please pin to a release tag for stable usage.
No GPU (laptop, CPU-only server)
bash
docker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:latest
NVIDIA (GTX 900-series through RTX 40; ships cu126)
bash
docker run --gpus all -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:latest
NVIDIA RTX 50-series / Blackwell (ships cu128)
bash
docker run --gpus all -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:latest-cu128
NVIDIA arm64 (Jetson, GH200; same tag, ships cu129)
bash
docker run --gpus all -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:latest
AMD GPU (ROCm, experimental, x86_64 only)
bash
docker run --device=/dev/kfd --device=/dev/dri -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-rocm:latest
Apple Silicon (native MPS clone; the CPU image also works)
bash
./start-gpu_mac.sh
gpu:latest is the same image as gpu:latest-cu126. Configuration via environment variables, see the configuration guide.
Quick Start (docker compose)
1. Install prerequisites, and start the service using Docker Compose (Full setup including UI):
- Install Docker
- Clone the repository:
bash
git clone https://github.com/remsky/Kokoro-FastAPI.git
cd Kokoro-FastAPI
cd docker/gpu For NVIDIA GPU support
or cd docker/cpu For CPU support
or cd docker/rocm For AMD GPU (ROCm, experimental, amd64 only)
docker compose up --build
Top issues
#286Is it possible to read a word with rising intonation? for example, to read 'apple' out as 'apple?'13 comments · 2025-04-08#535Conversion Of Roman Numerals10 comments · 2026-09-10#106Add Intel XPU support8 comments · 2025-01-31#551let ffmpeg handle speed-up/down, kokoro generates at 1.0x7 comments · 2026-10-26#227How to translate markdown to a proper text for kokoro?3 comments · 2025-03-08#368Includes originalWord in JSON response2 comments · 2025-07-22#601"Zero" inserted before decimal fraction where not needed0 comments · 2026-11-14
Discussions
#554Kokovo - It is Kokoro-FastAPI but for images!0 comments · 2026-10-26#540Voice names sorted by grade - no, thanks!3 comments · 2026-09-30#498How I use kokoro on android and linux1 comments · 2026-08-03#496V0.7.1 Docker Build fail4 comments · 2026-08-02#494Unable to d/l Kokoro v1.0 model files w/ Docker Compose or manual d/l5 comments · 2026-07-30#487FastKoko shows V0.6.0-rc1 not V0.6.01 comments · 2026-07-12#481Add Dutch language2 comments · 2026-06-26#477Proxy that converts LaTex notation into spoken language2 comments · 2026-06-09
Latest release
v0.10.0: Websockets/Realtime API, CPU Memory & API Keys v0.10.0 2026-11-08Curated summary: CHANGELOG.md feat(api): add ElevenLabs and Cartesia compatible websocket TTS for voice agents by @remsky in https://github.com/remsky/Kokoro-FastAPI/pull/576 feat(api): add OpenAI Realtime compatible TTS on /v1/realtime, Speech endpoint fields on all websockets by @remsky in https://github.com/remsky/Kokoro-FastAPI/pull/584 fix(docker): preload jemalloc in the CPU image to reduce + keep memory flat by @YaannnTech in https://github.com/remsky/Kokoro-FastAPI/pull/595 feat(api): optional API keys for the API routes by @davidcoulson in https://github.com/remsky/Kokoro-Fast