Kokoro-FastAPI-zh
Kokoro-FastAPI-zh is a self-hosted OpenAI-compatible text-to-speech API for homelabbers that serves the Kokoro-82M-v1.1-zh Chinese speech model, giving…
Platform availability
Available on 1 of 10 platforms
- Unraid
- TrueNAS (not listed)
- Umbrel (not listed)
- ZimaOS (not listed)
- Proxmox (not listed)
- Helm (not listed)
- Mac (not listed)
- Windows (not listed)
- Linux (not listed)
- Any server (not listed)
Health score?A 0-100 score computed nightly from four factors: maintained (40%: recent commits and steady activity), popular (25%: GitHub stars, log scale), easy to install (20%: platforms, install notes, setup guides, Docker image) and light to run (15%: minimum RAM, ARM support). When the source code has been checked, a fifth factor, security check (20%: automated scan for committed secrets, unsafe desktop-app settings, known-vulnerable dependencies and project hygiene; any serious finding caps it at 20), is added. Factors without data are left out and the rest are rescaled.
33/100 Low
- Maintained
- 47last commit 263 days ago
- Popular
- 2823 GitHub stars
- Easy to install
- 351 install platform, install notes, Docker image
- Light to run
- 304 GB minimum RAM
- Security check
- 103 serious findings, 7 minor, CI, tests
Security check: 3 serious findings
- Uses anyio 4.8.0, which has a known critical vulnerability (PyPI)
- Uses certifi 2024.12.14, which has a known critical vulnerability (PyPI)
- Uses h11 0.14.0, which has a known critical vulnerability (PyPI)
Automated checks on commit 0c919d8, 16 Nov 2026. Not an audit.
Availability: platform listings confirmed today, links checked 21 days ago
- GitHub stars
- 23
- Open issues
- 0
- Last commit
- 2026-03-03
- Latest release
- v0.2.4-zh
- License
- Apache-2.0
- Activity
- stale
Checked 7 days ago - source: GitHub (hsiang-han/Kokoro-FastAPI-zh)
Resources & Compatibility
Minimum requirements: 4 GB RAM, 2 CPU core(s).
Checked 54 days ago - source: Docker Hub image tags and published docs
First-install notes
- Install the speech package first Run npm i kokoro-js and set a valid model_id, such as onnx-community/Kokoro-82M-v1.0-ONNX, so Kokoro can download the speech engine. If this is missing or wrong, the app may start but cannot turn text into audio. source
- Match device and size to your machine Choose the compute device (wasm, webgpu, or cpu) and dtype (such as q8 or fp32) for how the model runs, because this changes speed and memory use. A poor match can make it crawl or fail, and the docs suggest fp32 when using webgpu (browser GPU). source
- Pick a voice before generating When generating speech, set a voice such as af_heart, and use tts.list_voices() if you need to see valid choices. If no valid voice is chosen, the request can error instead of creating an audio file. source
- Choose the CPU or GPU image Use the default CPU image on CPU-only hosts. For an NVIDIA GPU, set the image to ghcr.io/hsiang-han/kokoro-fastapi-zh-gpu:latest, set USE_GPU=true, and add --gpus=all --runtime=nvidia. source
Fetched 47 days ago - each note links to its source
Variants
Alternatives
No alternatives collected yet.
Common questions
What changes are required to use the GPU image instead of the default CPU image?
Use the GPU repository image, set USE_GPU=true, and add the container arguments --gpus=all --runtime=nvidia. Those GPU flags should not be left on CPU hosts.
Which model and voice are configured by default in this fork?
The default REPO_ID is hexgrad/Kokoro-82M-v1.1-zh, with model v1_1_zh/kokoro-v1_1-zh.pth and voice zf_094.
How does it handle English segments when generating Chinese audio?
When lang_code is set to 'z', en_callable is enabled and English segments are processed by the English pipeline.
What TCP port should a reverse proxy or client target for the API?
Use port 8880 for the OpenAI-compatible TTS API.
Answers sourced from github.com, localaimaster.com
Community
Collected 49 days ago - public community threads