Home/Speech & Audio/Kokoro-FastAPI
Kokoro-FastAPI logo

Kokoro-FastAPI

remsky/Kokoro-FastAPI

Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model

GraphCanon updated 3w · GitHub synced 3w · 28 views this month

5.3k stars858 forksLast push 1mo Python Apache-2.0

Decision brief

Kokoro-FastAPI is a Dockerized wrapper for the Kokoro-82M text-to-speech model using FastAPI. It supports multi-language capability and provides prebuilt images for various hardware types.

Good fit when

  • You require a solution that can auto-download models and run natively on Apple Silicon (MPS) with support via UV.
  • Your project needs an open-source text-to-speech model endpoint compatible with OpenAI, supporting multi-language audio synthesis.

Avoid when

  • If your hardware is not supported by the provided Docker images, for example, if you do not have a compatible NVIDIA, AMD GPU or CPU setup.
  • You are looking for non-Dockerized solutions. Kokoro-FastAPI focuses on containerization and might not fit environments that strictly avoid containers.
Requirements:
Min 4 GB RAM; Requires Docker; Hardware-specific Docker images are provided for CUDA, ROCm (experimental), and CPU support.; Users without supported GPUs can still utilize the service via a CPU image.

Observed Jul 17, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Active (8d since push)
As of 3w
Provenance
Not a fork · Personal account
As of 3w
Security (OSV)
No criticals
As of 1mo

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

pip install Kokoro-FastAPI
PyPI

How it fits your stack(1)

Typed graph edges - alternatives, integrations, successors, and dependencies. Ranked by relationship type, not raw GitHub stars.

Relationship graph

Optional deeper exploration of typed edges and category neighbours.

Similar tools

Same-category neighbours not already linked as typed edges.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

Repository hosts Docker images and Python scripts that wrap the Kokoro-82M text-to-speech model using FastAPI.

Capability facts

MCP server
No MCP server detected

Source: repo_scan · Jul 29, 2026

Languages
python, javascript

Source: github.language+package.json+pyproject.toml · Jul 29, 2026

Categories

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Python runtimePython

Source: README excerpt (regex_v1, Jul 29, 2026)

python docker/scripts/download_model.py --output api/src/models/v1_0
Source link

Tags

README

FastKoko

Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model

  • OpenAI-compatible Speech endpoint, multi-language support
    • English (US/GB), Spanish, French, Hindi, Italian, Japanese, Brazilian Portuguese, Mandarin Chinese
  • Per-word timestamped caption generation, voice mixing with weighted combinations
  • 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

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.

Your hardwareImage
No GPU (any laptop, VPS, CPU-only server)kokoro-fastapi-cpu:latest
Apple Silicon (M1/M2/M3)kokoro-fastapi-cpu:latest in Docker, or ./start-gpu_mac.sh natively for MPS
NVIDIA GTX 9xx, 10xx, 20xx, 30xx, 40xx (x86_64)kokoro-fastapi-gpu:latest-cu126 or kokoro-fastapi-gpu:latest
NVIDIA RTX 50-series / Blackwell (x86_64)kokoro-fastapi-gpu:latest-cu128
NVIDIA on arm64 (Jetson, GH200)kokoro-fastapi-gpu:latest (ships cu129, no cu126 arm64 wheels upstream)
AMD GPUkokoro-fastapi-rocm:latest (experimental, x86_64 only)
docker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:latest                                       # CPU
docker run --gpus all -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:latest                            # NVIDIA (x86_64 or arm64)
docker run --gpus all -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:latest-cu128                      # NVIDIA Blackwell / RTX 50-series
docker run --device=/dev/kfd --device=/dev/dri -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-rocm:latest  # AMD

Configuration via environment variables, see core/config.py. The :latest and :latest-cu126 tags resolve to the same multi-arch image.

Quick Start (docker compose)
  1. Install prerequisites, and start the service using Docker Compose (Full setup including UI):
    • Install Docker
    • Clone the repository:
      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
      
      # *Note for Apple Silicon (M1/M2/M3) users:
      # The Docker GPU image is CUDA-only and won't run on Apple Silicon. With Docker, use `docker/cpu`.
      # For native MPS (Apple GPU) acceleration, run directly via UV with `./start-gpu_mac.sh`.
      
      cd ../..  # back to repo root for the paths below
      
      # Models will auto-download, but if needed you can manually download:
      python docker/scripts/download_model.py --output api/src/models/v1_0
      
      # Or run directly via UV:
      ./start-gpu.sh  # For GPU support
      ./start-cpu.sh  # For CPU support
      
Direct Run (via uv)
  1. Install prerequisites ():
    • Install astral-uv

    • Install espeak-ng in your system if you want it available as a fallback for unknown words/sounds. The upstream libraries may attempt to handle this, but results have varied.

    • Clone the repository:

      git clone https://github.com/remsky/Kokoro-FastAPI.git
      cd Kokoro-FastAPI
      

      Run the [model download scri

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.