Home/Vector Databases/Kokoro-FastAPI
Kokoro-FastAPI logo

Kokoro-FastAPI

Enrichment pending
remsky/Kokoro-FastAPI

Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model w/multiplatform CPU, AMD, NVIDIA GPU PyTorch support, handling, and auto-stitching

GraphCanon updated today · GitHub synced today

5.2k
Stars
850
Forks
110
Open issues
38
Watchers
3w
Last push
Python Apache-2.0Created Dec 30, 2024

Trust & integrity

Full report
Maintenance
Active (23d since push)
As of today · Source: github_public_v1
Provenance
Not a fork · Personal account
As of today · Source: github_public_v1
Security (OSV)
No criticals
As of today · Source: osv@v1

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

Overview

Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model w/multiplatform CPU, AMD, NVIDIA GPU PyTorch support, handling, and auto-stitching

Capability facts

MCP server
No MCP server detected

Source: repo_scan · Jul 11, 2026

Languages
python, javascript

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

Categories

Compatibility

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

Python runtimePython

Source: README excerpt (regex_v1, Jul 11, 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