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
What it solves
Kokoro-FastAPI provides a standardized, easy-to-use interface for the Kokoro-82M text-to-speech model. It solves the problem of integrating this high-quality, lightweight speech model into existing applications by wrapping it in an API that mimics industry standards like OpenAI, ElevenLabs, and Cartesia.
How it works
The project acts as a bridge between the Kokoro-82M model and your applications. It runs as a containerized service (via Docker) or a direct script, exposing endpoints that accept text and return high-quality audio. It supports streaming, multi-speaker dialogue, and voice mixing, allowing you to use it as a drop-in replacement for popular commercial voice services in your own projects.
Who it’s for
This tool is designed for developers and hobbyists who want to run high-quality, local text-to-speech for voice agents, audiobooks, or home automation. It is ideal for those who need compatibility with existing AI frameworks (like LiveKit or Pipecat) or who want to host their own speech synthesis without relying on external cloud providers.
Highlights
- OpenAI-compatible Speech and Realtime endpoints for easy integration.
- Support for ElevenLabs and Cartesia-compatible websockets for voice agents.
- Multi-language support including English, Spanish, French, Hindi, Italian, Japanese, Portuguese, and Mandarin.
- Advanced voice features like weighted voice mixing, inline speaker switching, and custom voice tuning.
- Flexible deployment options including CPU, NVIDIA GPU (CUDA), AMD GPU (ROCm), and Apple Silicon (MPS).
- Built-in support for multiple audio formats (mp3, wav, opus, flac, aac, pcm) and streaming.
Related
- Dispatch
- Project
- Project
- Project
- Project