Repository navigation
v0.1.0
π KittenTTS FastAPI v0.1.0
- π§ Turns KittenTTS into a real deployable API service
- β‘ Keeps the lightweight model footprint while adding production ergonomics
- π Handles long-form input (chunking + merged output) for audiobook-style workflows
- π³ Ships with Docker-first deployment and clean local dev setup
π₯ What You Get
- π FastAPI backend with
/v1/audio/speechand/v1/audio/voices - π₯οΈ Built-in web UI for text input, voice controls, playback, and download
- π ONNX Runtime acceleration with
auto/cpu/cuda - βοΈ Environment-driven configuration via
KITTEN_* - π§© OpenAI-compatible API behavior for easier drop-in integration
π³ Quick Start
CPU Docker:
docker run -it -d \
--name kittentts-fastapi \
--restart unless-stopped \
-e KITTEN_MODEL_REPO_ID="KittenML/kitten-tts-nano-0.8-fp32" \
-p 8005:8005 \
ghcr.io/richardr1126/kittentts-fastapi-cpuLocal development:
cp .env.example .env
uv sync
uv run src/server.pyNVIDIA local setup:
uv sync --group nvidiaThen set KITTEN_TTS_DEVICE=cuda before startup.
π§ͺ API Example
curl http://localhost:8005/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"model": "kitten-tts",
"input": "Hello from the Kitten TTS FastAPI server!",
"voice": "Jasper",
"speed": 1.1,
"response_format": "mp3"
}' \
--output speech.mp3List voices:
curl http://localhost:8005/v1/audio/voicesπ Open Source
- π License: Apache-2.0
- π± Upstream model: KittenML/KittenTTS
- π€ Contributions, bug reports, and production feedback are welcome
π Credits
- KittenTTS by KittenML
- Early server foundation inspired by devnen/Kitten-TTS-Server