Skip to content

Kokoro FastAPI

Dockerized OpenAI-compatible text-to-speech server built on the Kokoro-82M model

Permissive (OSI) · Apache-2.0 AI-native

Listed by , founder & editor

82

Health

Thriving

Overview

Stars

5,731

Last commit

3 days ago

Nov 2026

Repository age

1 year

since Dec 2024

Latest version

v0.10.0

Nov 2026

Contributors

–

16 active in 90 days

Releases

15

last 12 months

Language

Python

Kokoro FastAPI wraps the Kokoro-82M text-to-speech model in a FastAPI server that you run in Docker. It exposes OpenAI-compatible speech and realtime endpoints, so tools that talk to OpenAI's speech API can point at your own machine instead.

It supports English (US and GB), Spanish, French, Hindi, Italian, Japanese, Brazilian Portuguese and Mandarin Chinese. You can mix voices with weights, generate multi-speaker audio inline, use SSML, and get per-word or per-chunk timestamped captions. Phoneme endpoints convert text to phonemes and phonemes to audio. ElevenLabs and Cartesia compatible websockets let it serve voice agents built with LiveKit or Pipecat. An optional web UI is included.

Prebuilt images exist for CPU and NVIDIA GPUs on amd64 and arm64, with experimental AMD ROCm on amd64. Apple Silicon works when you run it directly with uv. Released images verify model weights against a pinned hash. It is Apache-2.0 licensed and can stand in for hosted speech APIs such as OpenAI TTS or ElevenLabs.

Who it's for

Developers building voice agents

Compatible websocket and speech endpoints fit LiveKit and Pipecat setups.

Skip if: You need speech-to-text, since only TTS is covered.

Home Assistant and homelab users

Community projects use it as a local speech backend, and CPU images run without a GPU.

Skip if: You want a hosted service with no setup.

Audiobook and reader app users

Tools like epub_to_audiobook can use it as the voice backend.

Skip if: You need languages beyond the eight supported.

The problem it solves

Hosted text-to-speech APIs charge per use and send your text to a third party. This server lets you generate speech locally through the same API shape your tools already use.

Strengths

  • OpenAI-compatible speech and realtime endpoints
  • Eight languages with voice mixing, SSML and timestamped captions
  • CPU, NVIDIA and experimental AMD images on amd64 and arm64
  • Released images check model weights against a hardcoded sha256
  • Active project with 15 releases in the last year

Trade-offs

  • Text-to-speech only, no speech recognition
  • AMD ROCm support is experimental and amd64 only
  • Apple Silicon needs a direct uv run, with no image
  • Quality and voices are limited to what Kokoro-82M offers

Self-host Kokoro FastAPI

Self-hostable
Yes
Kubernetes
Helm chart available

Quick start

docker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:latest

From the project's own install instructions. Check the docs for production settings.

Frequently asked questions

Is it free?

Yes. It is Apache-2.0 licensed and you run it yourself.

Do I need a GPU?

No. A CPU image is available, and NVIDIA GPU images are provided for faster generation.

Is it compatible with the OpenAI API?

Yes. It offers OpenAI-compatible speech and realtime endpoints for TTS.

Does it run on Apple Silicon?

Yes, through MPS when you run it directly with uv. No Docker image is provided for that.

Similar tools in Text-to-speech and voice AI

OpenUtau

Text-to-speech and voice AI

Singing voice editor for UTAU users on Windows, macOS and Linux

4.6k 612 8 days ago Active MIT

RHVoice - a speech synthesizer

Text-to-speech and voice AI

Offline speech synthesizer with small voices for Windows, Linux and Android

1.9k 267 2 days ago Active GPL-2.0

SherpaTTS

Text-to-speech and voice AI

Offline text-to-speech engine for Android that runs Piper and Coqui voices

824 58 4 months ago Slowing GPL-3.0

chatterbox-tts-api

Text-to-speech and voice AI

Self-hosted, OpenAI-compatible text-to-speech API with voice cloning

701 159 11 months ago Dormant AGPL-3.0

OpenReader

Text-to-speech and voice AI

Self-hosted text-to-speech reader for EPUB, PDF, TXT, Markdown and DOCX with read-along

596 82 yesterday Thriving MIT

QuickVoice

Text-to-speech and voice AI

495 545 22 days ago Slowing MIT