FreeSWITCH 简单图形化界面45 - 收集打包的一些TTS
FreeSWITCH 简单图形化界面45 - 收集打包的一些TTS
- 0、一个fs的web配置界面预览
- 1、docker地址
- 2、使用
- 2.1 下载
- 2.2 运行
- 3、例子
- 4、可以搭配FreeSWITCH mod_tts_command模块使用
0、一个fs的web配置界面预览
http://myfs.f3322.net:8020/
用户名:admin,密码:admin
FreeSWITCH界面安装参考:https://blog.csdn.net/jia198810/article/details/137820796
1、docker地址
registry.cn-hangzhou.aliyuncs.com/pbx/sherpa-kokoro-tts latest 956 MB
registry.cn-hangzhou.aliyuncs.com/pbx/piper-tts latest 459 MB
registry.cn-hangzhou.aliyuncs.com/pbx/kokoro-tts latest 6.93 GB
registry.cn-hangzhou.aliyuncs.com/pbx/tts-eula latest 693 MB
registry.cn-hangzhou.aliyuncs.com/pbx/tts-ll latest 690 MB
registry.cn-hangzhou.aliyuncs.com/pbx/tts-aishell3 latest 768 MB
registry.cn-hangzhou.aliyuncs.com/pbx/tts-melo latest 746 MB
registry.cn-hangzhou.aliyuncs.com/pbx/melo-onnx-tts latest 1.68 GB
2、使用
2.1 下载
# 下载对应的tts地址
podman pull registry.cn-hangzhou.aliyuncs.com/pbx/piper-tts
2.2 运行
# tts-aishell3 中文 174个speakers 0-173.
# vits-icefall-zh-aishell3podman run -itd -v /tmp:/tmp/ --name tts-aishell3 tts-aishell3 bash
podman exec -it tts-aishell3 /root/tts.sh 4 1 1.3 0.5 1 /tmp/output11.wav "我是一个中国人,我热爱我的国家"# 速度慢
# tts-melo 中英文 1个speakers 0
# vits-melo-tts-zh_enpodman run -itd -v /tmp:/tmp/ --name tts-melo tts-melo bash
podman exec -it tts-melo /root/tts.sh 4 1 1.3 0.5 1 /tmp/output11.wav "我是一个中国人,我热爱我的国家"# 速度还行 中文 5个speakers 0-5
# sherpa-onnx-vits-zh-ll
podman run -itd -v /tmp:/tmp/ --name tts-ll tts-ll bash
podman exec -it tts-ll /root/tts.sh 4 1 1.3 0.5 1 /tmp/output11.wav "我是一个中国人,我热爱我的国家"# 速度还行 中文 804 个speakers 0-803
podman run -itd -v /tmp:/tmp/ --name tts-eula tts-eula bash
podman exec -it tts-eula /root/tts.sh 4 1 1.3 0.5 1 /tmp/output11.wav "我是一个中国人,我热爱我的国家"# Kokoro-tts
podman run -itd -v /tmp:/tmp/ --name kokoro-tts kokoro-tts
podman exec -it kokoro-tts /root/tts.sh zf_xiaoxiao /tmp/output.wav "我是一个中国人,我爱我的国家"# Piper-tts x_low小模型 medium中模型,脚本第一个参数可替换
podman run -itd -v /tmp/:/tmp/ --name piper-tts piper-tts
podman exec -it piper-tts /root/tts.sh medium output2.wav "我是一个中国人,现在时间是2025年5月28日 22:06:48"# sherpa-kokoro-tts 中文 + 英文, 53 人(相比上面的少一个噪音参数)
podman run -itd -v /tmp/:/tmp/ --name sherpa-kokoro-tts sherpa-kokoro-tts
podman exec -it sherpa-kokoro-tts /root/tts.sh 4 1 1.3 2 /tmp/output11.wav "我是一个中国人,我热爱我的国家"
#用法: /root/tts.sh <线程数> <说话人ID> <速度(默认1)> <最大同时处理句子数(默认1)> <输出文件名> <TTS内容># melotts-onnx 1个speaker
podman run -itd -v /tmp/:/tmp/ --name melo-onnx-tts melo-onnx-tts
podman exec -it melo-onnx-tts /root/tts.sh 4 CPU /tmp/test.wav "我是一个中国人,我爱我的国家"
# 用法: /root/tts.sh <线程数:4> <推理设备:CPU/CUDA> <输出文件名> <TTS内容>
3、例子
root@xiaojia-ts /h/xiaojia# podman pull registry.cn-hangzhou.aliyuncs.com/pbx/piper-tts (base) Trying to pull registry.cn-hangzhou.aliyuncs.com/pbx/piper-tts:latest...
Getting image source signatures
Copying blob 5b4de9788e44 done |
Copying blob 31a9d0a6b8df done |
Copying blob 095f960760ee done |
Copying config fbd6a8c48e done |
Writing manifest to image destination
fbd6a8c48ea1709ef118c27e439dfcd607d8b986be67255957a312553798adad
root@xiaojia-ts /h/xiaojia# podman run -itd -v /tmp/:/tmp/ --name piper-tts piper-tts (base)
04dda59fe74dc0601906ec573215fec501d738811d80a6771fe6ebfcda61a353
root@xiaojia-ts /h/xiaojia# podman exec -it piper-tts /root/tts.sh medium output2.wav "我是一个中国人,现在时间是2025年5月28日 22:06:48"
[2025-07-24 20:35:09.154] [piper] [info] Loaded voice in 0.506343748 second(s)
[2025-07-24 20:35:09.155] [piper] [info] Initialized piper
/tmp/output2.wav
[2025-07-24 20:35:09.613] [piper] [info] Real-time factor: 0.06753219112174243 (infer=0.434362153 sec, audio=6.431927437641724 sec)
[2025-07-24 20:35:09.613] [piper] [info] Terminated piper
root@xiaojia-ts /h/xiaojia# ls /tmp/ (base)
fish.root/ OneCaller.js output2.wav RustDesk/ snap-private-tmp/
root@xiaojia-ts /h/xiaojia# sz /tmp/output2.wav (base)
root@xiaojia-ts /h/xiaojia#
4、可以搭配FreeSWITCH mod_tts_command模块使用
mod_tts_command用的是tmp目录,
可参考该模块使用方法。
https://blog.csdn.net/jia198810/article/details/132521379?spm=1011.2415.3001.5331
祝君成功,好运连连