{"data":{"slug":"remsky-kokoro-fastapi","name":"Kokoro-FastAPI","tagline":"Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model w/multiplatform CPU, AMD, NVIDIA GPU PyTorch support, handling, and auto-stitching","github_url":"https://github.com/remsky/Kokoro-FastAPI","owner":"remsky","repo":"Kokoro-FastAPI","owner_avatar_url":"https://avatars.githubusercontent.com/u/25017870?v=4","primary_language":"Python","stars":5197,"forks":850,"topics":["fastapi","huggingface-spaces","kokoro","kokoro-tts","openai-compatible-api","openwebui","pytorch","sillytavern","text-to-speech","tts","tts-api","uv"],"archived":false,"github_pushed_at":"2026-06-18T06:49:07+00:00","maintenance_label":"Active","url":"https://www.graphcanon.com/tools/remsky-kokoro-fastapi","markdown_url":"https://www.graphcanon.com/tools/remsky-kokoro-fastapi.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/remsky-kokoro-fastapi","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=remsky-kokoro-fastapi","description":"Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model w/multiplatform CPU, AMD, NVIDIA GPU PyTorch support, handling, and auto-stitching","homepage_url":null,"license":"Apache-2.0","open_issues":110,"watchers":38,"ai_summary":null,"readme_excerpt":"<p align=\"center\">\n  <img src=\"githubbanner.png\" alt=\"Kokoro TTS Banner\">\n</p>\n\n# <sub><sub>_`FastKoko`_ </sub></sub> \n \n\n\n\n\n \n\n \n\n\n\nDockerized FastAPI wrapper for [Kokoro-82M](https://huggingface.co/hexgrad/Kokoro-82M) text-to-speech model\n- OpenAI-compatible Speech endpoint, multi-language support\n  - English (US/GB), Spanish, French, Hindi, Italian, Japanese, Brazilian Portuguese, Mandarin Chinese\n- Per-word timestamped caption generation, voice mixing with weighted combinations\n- Phoneme endpoints: generate phonemes from text, or generate audio from phonemes\n- Prebuilt multiplatform images\n  - CPU and NVIDIA GPU (CUDA): linux/amd64 + linux/arm64\n  - AMD GPU (ROCm, experimental): linux/amd64 only\n- Apple Silicon (MPS) supported when running directly via UV (no image)\n\n\n### Integration Guides\n \n\n   \n\n## Get Started\n\n<details>\n<summary>Quickest Start (docker run)</summary>\n\nPre-built multi-arch images with models baked in. \n\n`:latest` is available, but please pin to a release tag for stable usage.\n\n| Your hardware | Image |\n|---|---|\n| No GPU (any laptop, VPS, CPU-only server) | `kokoro-fastapi-cpu:latest` |\n| Apple Silicon (M1/M2/M3) | `kokoro-fastapi-cpu:latest` in Docker, or `./start-gpu_mac.sh` natively for MPS |\n| NVIDIA GTX 9xx, 10xx, 20xx, 30xx, 40xx (x86_64) | `kokoro-fastapi-gpu:latest-cu126` or `kokoro-fastapi-gpu:latest` |\n| NVIDIA RTX 50-series / Blackwell (x86_64) | `kokoro-fastapi-gpu:latest-cu128` |\n| NVIDIA on arm64 (Jetson, GH200) | `kokoro-fastapi-gpu:latest` (ships cu129, no cu126 arm64 wheels upstream) |\n| AMD GPU | `kokoro-fastapi-rocm:latest` (experimental, x86_64 only) |\n\n```bash\ndocker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:latest                                       # CPU\ndocker run --gpus all -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:latest                            # NVIDIA (x86_64 or arm64)\ndocker run --gpus all -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:latest-cu128                      # NVIDIA Blackwell / RTX 50-series\ndocker run --device=/dev/kfd --device=/dev/dri -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-rocm:latest  # AMD\n```\n\nConfiguration via environment variables, see `core/config.py`. The `:latest` and `:latest-cu126` tags resolve to the same multi-arch image.\n\n</details>\n\n<details>\n\n<summary>Quick Start (docker compose) </summary>\n\n1. Install prerequisites, and start the service using Docker Compose (Full setup including UI):\n   - Install [Docker](https://www.docker.com/products/docker-desktop/)\n   - Clone the repository:\n        ```bash\n        git clone https://github.com/remsky/Kokoro-FastAPI.git\n        cd Kokoro-FastAPI\n\n        cd docker/gpu   # For NVIDIA GPU support\n        # or cd docker/cpu   # For CPU support\n        # or cd docker/rocm  # For AMD GPU (ROCm, experimental, amd64 only)\n        docker compose up --build\n\n        # *Note for Apple Silicon (M1/M2/M3) users:\n        # The Docker GPU image is CUDA-only and won't run on Apple Silicon. With Docker, use `docker/cpu`.\n        # For native MPS (Apple GPU) acceleration, run directly via UV with `./start-gpu_mac.sh`.\n\n        cd ../..  # back to repo root for the paths below\n\n        # Models will auto-download, but if needed you can manually download:\n        python docker/scripts/download_model.py --output api/src/models/v1_0\n\n        # Or run directly via UV:\n        ./start-gpu.sh  # For GPU support\n        ./start-cpu.sh  # For CPU support\n        ```\n</details>\n<details>\n<summary>Direct Run (via uv) </summary>\n\n1. Install prerequisites ():\n   - Install [astral-uv](https://docs.astral.sh/uv/)\n   - Install [espeak-ng](https://github.com/espeak-ng/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.\n   - Clone the repository:\n        ```bash\n        git clone https://github.com/remsky/Kokoro-FastAPI.git\n        cd Kokoro-FastAPI\n        ```\n        \n        Run the [model download scri","github_created_at":"2024-12-30T11:53:42+00:00","created_at":"2026-07-11T12:06:28.423955+00:00","updated_at":"2026-07-11T12:06:38.261958+00:00","categories":[{"slug":"vector-databases","name":"Vector Databases","url":"https://www.graphcanon.com/categories/vector-databases","markdown_url":"https://www.graphcanon.com/categories/vector-databases.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/vector-databases"},{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"},{"slug":"speech-audio","name":"Speech & Audio","url":"https://www.graphcanon.com/categories/speech-audio","markdown_url":"https://www.graphcanon.com/categories/speech-audio.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/speech-audio"}],"tags":[{"slug":"kokoro","name":"kokoro"},{"slug":"huggingface-spaces","name":"huggingface-spaces"},{"slug":"openwebui","name":"openwebui"},{"slug":"fastapi","name":"fastapi"},{"slug":"pytorch","name":"pytorch"},{"slug":"kokoro-tts","name":"kokoro-tts"},{"slug":"openai-compatible-api","name":"openai-compatible-api"},{"slug":"sillytavern","name":"sillytavern"}],"trust":{"provenance":{"is_fork":false,"github_id":910061041,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-11T12:06:29.058Z","maintenance":{"label":"Active","score":82,"methodology":"github_public_v1","releases_90d":3,"days_since_push":23,"last_release_at":"2026-06-06T21:26:00Z"},"security_summary":{"status":"ok","scanner":"osv@v1","low_count":0,"high_count":0,"last_scan_at":"2026-07-11T12:06:30.690Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"mcp":{"source":"repo_scan","observed_at":"2026-07-11T12:06:30.313Z","server_manifest":false},"scan":{"source":"repo_scan","observed_at":"2026-07-11T12:06:30.313Z"},"languages":{"value":["python","javascript"],"source":"github.language+package.json+pyproject.toml","observed_at":"2026-07-11T12:06:30.313Z"},"license_spdx":{"value":"Apache-2.0","source":"github.license","observed_at":"2026-07-11T12:06:30.313Z"}}}}