Kokoro-FastAPI-zh
Docker 应用程序 from hsiang's Repository
概述
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).
运行时参数
- 网络用户界面
http://[IP]:[PORT:8880]/web- 网络
bridge- 外壳
bash- 特权
- false
模板配置
WebUI PortPorttcp
Web/API exposed port
- 目标
- 8880
- 默认值
- 8880
- 价值
- 8880
Models PathPathrw
Host path for model files
- 目标
- /app/api/src/models
- 默认值
- /mnt/user/appdata/kokoro-fastapi-zh/models
- 价值
- /mnt/user/appdata/kokoro-fastapi-zh/models
Voices PathPathrw
Host path for voice .pt files
- 目标
- /app/api/src/voices
- 默认值
- /mnt/user/appdata/kokoro-fastapi-zh/voices
- 价值
- /mnt/user/appdata/kokoro-fastapi-zh/voices
Python PathVariable
Python import path
- 目标
- PYTHONPATH
- 默认值
- /app:/app/api
- 价值
- /app:/app/api
Python UnbufferedVariable
Enable unbuffered Python logs
- 目标
- PYTHONUNBUFFERED
- 默认值
- 1
- 价值
- 1
Repo IDVariable
HuggingFace model repo
- 目标
- REPO_ID
- 默认值
- hexgrad/Kokoro-82M-v1.1-zh
- 价值
- hexgrad/Kokoro-82M-v1.1-zh
Default VoiceVariable
Default voice name
- 目标
- DEFAULT_VOICE
- 默认值
- zf_001
- 价值
- zf_094
Default Voice CodeVariable
Optional language code override. Set z to force zh pipeline.
- 目标
- DEFAULT_VOICE_CODE
- 默认值
- z
- 价值
- z
Model FileVariable
Model path relative to /app/api/src/models
- 目标
- KOKORO_V1_FILE
- 默认值
- v1_1_zh/kokoro-v1_1-zh.pth
- 价值
- v1_1_zh/kokoro-v1_1-zh.pth
Voices DirVariable
Voice directory in container
- 目标
- VOICES_DIR
- 默认值
- /app/api/src/voices/v1_1_zh
- 价值
- /app/api/src/voices/v1_1_zh
API Log LevelVariable
API logging level
- 目标
- API_LOG_LEVEL
- 默认值
- DEBUG
- 价值
- DEBUG
Use GPUVariable
CPU default=false. For NVIDIA GPU set true and switch Repository to *-gpu image.
- 目标
- USE_GPU
- 默认值
- false
- 价值
- false
NVIDIA Visible DevicesVariable
Only needed for GPU mode
- 目标
- NVIDIA_VISIBLE_DEVICES
- 默认值
- all
- 价值
- all
NVIDIA Driver CapsVariable
Only needed for GPU mode
- 目标
- NVIDIA_DRIVER_CAPABILITIES
- 默认值
- compute,utility
- 价值
- compute,utility
详细信息
在Unraid 上运行 Kokoro-FastAPI-zh 。
Kokoro-FastAPI-zh 已被列入Unraid OS 的社区应用程序。探索Unraid ,构建灵活的家庭服务器、NAS 或家庭实验室。