本项目是基于派蒙语音合成 - Colab笔记搭建的docker镜像。
基于以上Colab笔记,本项目利用FastAPI搭建了一个阅读APP可以使用的用于TTS合成API。
本镜像已经分离了model文件和镜像,需要自行下载pth文件。 本镜像已经支持异步处理。 本镜像已经可以通过修改环境变量调节语音合成默认速度。
本镜像基于PyTorch 21.0,因此需要CUDA 12.1。
docker compose up -dversion: '3'
services:
paimon:
container_name: paimon
image: doiiars/paimon:v1.3
volumes:
- ./audiohistory:/content/VITS-Paimon/audiohistory
- ./paimon-data/content/VITS-Paimon/model:/content/VITS-Paimon/model
environment:
- PYTHONUNBUFFERED=1
- PYTHONIOENCODING=UTF-8
- TZ=Asia/Shanghai
- LANGUAGE=zh_CN.UTF-8
- LANG=zh_CN.UTF-8
- NVIDIA_VISIBLE_DEVICES=all
- AUTH #改成你的密码
- MODEL #模型名称
- SPEED #合成的语音的速度(实际上是步长,越长越慢)
ports:
- 7850:7850
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: "all"
capabilities: [gpu]
replace.to.yourwebsite和replacetoyourauth修改为你自己的域名和密钥。将replacetoyourname修改为你自己的用户名。注意:需要密钥需要有且只有 32位 。以http或https开头,请根据具体情况设定。
https://replace.to.yourwebsite/tts/{{String(speakText).replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>')}}?auth=replacetoyourauth&user=replacetoyourname
audio/x-wav
查看 https://replace.to.yourwebsite/docs 获取具体的api使用方式。
有任何问题请联系[email protected]
Content type
Image
Digest
sha256:9fec1a5f9…
Size
3.4 GB
Last updated
almost 3 years ago
docker pull doiiars/paimon