基于以下项目修改
https://github.com/OHF-Voice/piper1-gpl
# Piper TTS (piper1-gpl) — CPU 版
# 镜像: naore/pipertts:latest 端口 5000
# 首次使用先下载 voice (只需一次):
# docker compose run --rm piper download en_US-lessac-medium
# 换 voice: 先 download 对应名字, 再改 command 的 -m 参数
# 也可从此处下载 https://rhasspy.github.io/piper-samples/
services:
piper:
image: naore/pipertts:latest
container_name: pipertts
ports:
- "5000:5000" # HTTP API
volumes:
- ./piper_data:/data # voice 模型 + 音频输出, 持久化
# -m 传 voice 名(不带 .onnx 后缀), 文件从 /data 读取
- PIPER_EN_VOICE=en_GB-alba-medium
- PIPER_MIXED_LANG=1 #支持不同语言混合输出
- HF_XET_HIGH_PERFORMANC=1 # 加速模型下载
- PIPER_SAVE_AUDIO=1 #可选保存音频,1|true|on均可
command: ["server", "-m", "zh_CN-xiao_ya-medium"]
restart: unless-stopped
Content type
Image
Digest
sha256:dee54044a…
Size
157.9 MB
Last updated
3 days ago
docker pull naore/pipertts