Kokoro-FastAPI-zh

Kokoro-FastAPI-zh

Docker app from hsiang's Repository

Overview

OpenAI-compatible TTS API based on Kokoro-82M-v1.1-zh. Default uses CPU image. For GPU: change Repository to ghcr.io/hsiang-han/kokoro-fastapi-zh-gpu:latest, set USE_GPU=true, and add Extra Parameters: --gpus=all --runtime=nvidia (do not set as default on CPU hosts).

Runtime arguments

Web UI
http://[IP]:[PORT:8880]/web
Network
bridge
Shell
bash
Privileged
false

Template configuration

WebUI PortPorttcp

Web/API exposed port

Target
8880
Default
8880
Value
8880
Models PathPathrw

Host path for model files

Target
/app/api/src/models
Default
/mnt/user/appdata/kokoro-fastapi-zh/models
Value
/mnt/user/appdata/kokoro-fastapi-zh/models
Voices PathPathrw

Host path for voice .pt files

Target
/app/api/src/voices
Default
/mnt/user/appdata/kokoro-fastapi-zh/voices
Value
/mnt/user/appdata/kokoro-fastapi-zh/voices
Python PathVariable

Python import path

Target
PYTHONPATH
Default
/app:/app/api
Value
/app:/app/api
Python UnbufferedVariable

Enable unbuffered Python logs

Target
PYTHONUNBUFFERED
Default
1
Value
1
Repo IDVariable

HuggingFace model repo

Target
REPO_ID
Default
hexgrad/Kokoro-82M-v1.1-zh
Value
hexgrad/Kokoro-82M-v1.1-zh
Default VoiceVariable

Default voice name

Target
DEFAULT_VOICE
Default
zf_001
Value
zf_094
Default Voice CodeVariable

Optional language code override. Set z to force zh pipeline.

Target
DEFAULT_VOICE_CODE
Default
z
Value
z
Model FileVariable

Model path relative to /app/api/src/models

Target
KOKORO_V1_FILE
Default
v1_1_zh/kokoro-v1_1-zh.pth
Value
v1_1_zh/kokoro-v1_1-zh.pth
Voices DirVariable

Voice directory in container

Target
VOICES_DIR
Default
/app/api/src/voices/v1_1_zh
Value
/app/api/src/voices/v1_1_zh
API Log LevelVariable

API logging level

Target
API_LOG_LEVEL
Default
DEBUG
Value
DEBUG
Use GPUVariable

CPU default=false. For NVIDIA GPU set true and switch Repository to *-gpu image.

Target
USE_GPU
Default
false
Value
false
NVIDIA Visible DevicesVariable

Only needed for GPU mode

Target
NVIDIA_VISIBLE_DEVICES
Default
all
Value
all
NVIDIA Driver CapsVariable

Only needed for GPU mode

Target
NVIDIA_DRIVER_CAPABILITIES
Default
compute,utility
Value
compute,utility

Details

Repository
ghcr.io/hsiang-han/kokoro-fastapi-zh-cpu:latest
Last Updated2026-05-31
First Seen2026-03-11

Run Kokoro-FastAPI-zh on Unraid.

Kokoro-FastAPI-zh is listed in Community Apps for Unraid OS. Explore Unraid to build a flexible home server, NAS, or homelab.