Kokoro-FastAPI-GPU
Docker 应用程序 from pureelectricity's Repository
概述
Kokoro-FastAPI is a Dockerized FastAPI wrapper for the Kokoro-82M text-to-speech model, optimized for speed and quality.
Features:
- High-quality Japanese and English text-to-speech.
- Accelerated inference using NVIDIA GPUs.
- OpenAI-compatible speech endpoint.
Home Assistant Integration:
This container is fully compatible with the OpenAI TTS integration in Home Assistant. You can generate local, OpenAI-level quality voice audio using your own GPU.
1. Install the OpenAI TTS integration (via HACS).
2. Set the "API Key" to any random text (e.g., "123").
3. Set the "Target URL" to: http://[IP]:8880/v1
Requirements:
- Requires the Nvidia Driver plugin.
- This container runs as internal user 1001. Ensure your "Temp Files" output directory is writable by this user.
- The WebUI is located at /web.
Features:
- High-quality Japanese and English text-to-speech.
- Accelerated inference using NVIDIA GPUs.
- OpenAI-compatible speech endpoint.
Home Assistant Integration:
This container is fully compatible with the OpenAI TTS integration in Home Assistant. You can generate local, OpenAI-level quality voice audio using your own GPU.
1. Install the OpenAI TTS integration (via HACS).
2. Set the "API Key" to any random text (e.g., "123").
3. Set the "Target URL" to: http://[IP]:8880/v1
Requirements:
- Requires the Nvidia Driver plugin.
- This container runs as internal user 1001. Ensure your "Temp Files" output directory is writable by this user.
- The WebUI is located at /web.
要求
Nvidia Driver
运行时参数
- 网络用户界面
http://[IP]:[PORT:8880]/web- 网络
bridge- 外壳
bash- 特权
- false
- 额外参数
--gpus all --restart=unless-stopped
模板配置
WebUI PortPorttcp
Port for the FastAPI server.
- 目标
- 8880
- 默认值
- 8880
- 价值
- 8880
Temp Files (Audio Output)Pathrw
Directory where generated audio files are saved. MUST be writable by UID 1001.
- 目标
- /app/api/temp_files
- 默认值
- /mnt/user/appdata/kokoro-tts/temp
NVIDIA_VISIBLE_DEVICESVariable
GPU UUID to pass to the container (or 'all').
- 默认值
- all
- 价值
- all
NVIDIA_DRIVER_CAPABILITIESVariable
Nvidia driver capabilities.
- 默认值
- all
- 价值
- all
Use GPUVariable
Explicitly enable GPU usage.
- 目标
- USE_GPU
- 默认值
- true
- 价值
- true
Device TypeVariable
Set inference device (gpu or cpu).
- 目标
- DEVICE
- 默认值
- gpu
- 价值
- gpu
详细信息
存储库
ghcr.io/remsky/kokoro-fastapi-gpu:latest最后更新2026-05-31
初见2025-04-25
在Unraid 上运行 Kokoro-FastAPI-GPU 。
Kokoro-FastAPI-GPU 已被列入Unraid OS 的社区应用程序。探索Unraid ,构建灵活的家庭服务器、NAS 或家庭实验室。