顶顶通呼叫中心中间件-私有化TTS安装指南
1、下载模型
执行这个下载模型
wget http://down.ddrj.com/paddlespeech_tts.zip
2、解压模型
执行这个解压模型
unzip -d /ddt/asrproxy paddlespeech_tts.zip
3、配置asrproxy.json文件
这里需要注意的是:以下内容是tts,不能把asrproxy.json文件覆盖,修改之前建议先备份,如果有配置第三方就更需要备份一个asrproxy.json文件,以下内容只能复制在“"tts":{”以下,如果复制这这个上面就会导致asrproxy启动不了,所以配置之前建议先备份一个asrproxy.json文件。当然如果不想通篇复制你可以根据下面的去查看需要怎么去配置。配置好了需要重新启动asr即可生效
"tts":{"storage": "tts", //tts缓存目录"append_silence": 20, //tts后的声音文件前后追加静音"trim_threshold_volume": 50, //tts后的声音文件前后小于多少音量认为是静音去除"listen_ip":"0.0.0.0","listen_port": 9989,"bgtts_thread_count":10,"acl":"*", //哪些IP可以访问,配置*任意IP都可以访问,多个IP用逗号隔开,如果不配置acl,通过127.0.0.1不需要配置在ACL里面也可以访问。"interface":{//顶顶通私有化语音合成接口"paddlespeech": {"type": "paddlespeech","front_conf":"paddlespeech_tts/front.conf","am_model":"paddlespeech_tts/weights/fastspeech2_csmsc.onnx","voc_model":"paddlespeech_tts/weights/mb_melgan_csmsc.onnx","thread_num":1},//阿里云语音合成接口"aliyun":{"count":0,"fault_threshold":0,"fault_try_interval":600,"type":"aliyun","appid":"","key":"","secret":""},//百度语音合成接口"baidu":{"connect_timeout":3000,"response_timeout":60000,"count":0,"fault_threshold":0,"fault_try_interval":600,"type":"baidu","appid":"","key":"","secret":""},//讯飞语音合成接口,开通地址 https://console.xfyun.cn/services/tts"xfyun": {"count": 0,"fault_threshold": 0,"fault_try_interval": 600,"rdn": "0", //合成音频数字发音方式,参数说明 https://www.xfyun.cn/doc/tts/online_tts/API.html"reg": "0", //设置英文发音方式:"connect_timeout": 3000, //建立ws连接最大等待时间"response_timeout": 60000, //等待tts返回的最大时间"type": "xfyun", //xfyun 标识这个配置试用讯飞云ASR引擎"appid": "", //APPID"key": "", //APIKey"secret": "" //APISecret},//华为语音合成 https://support.huaweicloud.com/api-sis/sis_03_0111.html"huawei": {"connect_timeout": 3000,"response_timeout": 60000,"type": "huawei","projectname": "", //项目名字实际含义是项目节点 我的凭证处获取,如果没有项目先创建项目"projectid": "", //项目ID 我的凭证处获取"key": "", //Access Key Id 我的凭证(访问密钥)处创建"secret": "" //Secret Access Key 创建访问密钥时下载获取},/* 多方TTS */"duofang": {"connect_timeout":3000,"response_timeout":60000,"type": "duofang","appid": "","key": "","secret": ""},/*"mrcp": {"count": 0,"fault_threshold": 0,"fault_try_interval": 600,"type": "mrcp","engine": "uni2","appid": "","key": "","secret": ""}*/},"groups":{"default":{"mode":1,"enable":["paddlespeech" ]},//自定义组,可以话术中指定使用那组TTS配置。"custom":{"mode":0,"enable":[]}}}}
4、重新启动asrproxy
- cd /ddt/asrproxy
- pgrep asrproxy
- kill -9 上面命令的输出
- ./asrproxy
如果有配置自动启动就不需要执行"步骤1"和"步骤4“