頂頂通呼叫中心中間件-私有化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“