selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
Kokoro FastAPI logo

Self-host Kokoro FastAPI

v0.10.0

OpenAI-compatible text-to-speech API with web player

ReleaseOpen SourceApache-2.0
docker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:latest
Updated5 days ago
LanguagePython
Setup difficultyEasy
Stars
5 676
RAM
4gb
Port
8880 (HTTP server for the API, OpenAPI docs and web player)
Docker
ghcr.io/remsky/kokoro-fastapi-cpu
The built-in web player for generating speech

What 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

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

Kokoro FastAPI README

FastKoko: Dockerized Kokoro-82M TTS, OpenAI-compatible API

remsky%2FKokoro-FastAPI | Trendshift

How to install Kokoro FastAPI

Install Kokoro FastAPI with Docker

Environment variables
PORT, USE_GPU, DEVICE_TYPE, DEFAULT_VOICE, API_LOG_LEVEL, ENABLE_WEB_PLAYER
docker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:latest

For NVIDIA:

docker run --gpus all -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:latest

For AMD GPU (ROCm, experimental, x86_64 only):

docker run --device=/dev/kfd --device=/dev/dri -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-rocm:latest

Pre-built multi-arch images with models baked in; `:latest` is available but the README asks you to pin to a release tag for stable usage.

How to configure Kokoro FastAPI

  • API_LOG_LEVELDEBUG
  • DOWNLOAD_MODELtrue
  • USE_GPUtrue
  • HOST0.0.0.0
  • PORT8880

Kokoro FastAPI releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

Models for Kokoro FastAPI

Open-weight models you can plug into Kokoro FastAPI, most popular first.

hexgrad logo
Kokoro-82Mhexgrad
TTS82MCommercial OK≈0.7 GB↓ 12.6M
fishaudio logo
drama-3fishaudio
TTS35.9BA4.7BNon-commercial≈43 GB↓ 48.2K
k2-fsa logo
OmniVoicek2-fsa
TTS613MCheck licence≈1.9 GB↓ 3.8M
Qwen logo TTS1.9BCommercial OK≈4.8 GB↓ 1.3M
m-a-p logo
YuE2-3Bm-a-p
TTS3.6BNon-commercial≈4.8 GB↓ 22.3K
openbmb logo
VoxCPM2openbmb
TTS2.3BCommercial OK≈5.6 GB↓ 984.9K
Qwen logo TTS915MCommercial OK≈2.5 GB↓ 836.8K
BreezeBlue logo
Breeze-TTS-2BreezeBlue
TTS3.5BNon-commercial≈4.6 GB↓ 24.8K

Browse all 169 models →

More in Text to Speech

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…