Update huoshan-streamTTS-voice-cloning.md

This commit is contained in:
Alireza Jahanshahlou 2025-10-12 17:33:05 +03:30 committed by GitHub
parent 5fcec20166
commit 21429705a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,29 +1,29 @@
# 火山双向流式TTS+声音克隆配置教程 # Volcano Bidirectional Streaming TTS + Voice Cloning Configuration Tutorial
单模块部署下,使用火山引擎双向流式语音合成服务的同时进行声音克隆,支持WebSocket协议流式调用。 In a single-module deployment, voice cloning is performed while using the Volcano Engine bidirectional streaming speech synthesis service, supporting WebSocket protocol streaming calls.
### 1.开通火山引擎服务 ### 1. Open the Volcano Engine service
访问 https://console.volcengine.com/speech/app 在应用管理创建应用,勾选语音合成大模型和声音复刻大模型,左边列表点击声音复刻大模型后下滑获得App Id,Access Token,Cluster ID以及声音ID(S_xxxxx) Visit https://console.volcengine.com/speech/app and create an app in the App Manager. Select the speech synthesis model and the sound replication model. Click the sound replication model in the list on the left and scroll down to obtain the App ID, Access Token, Cluster ID, and Sound ID (S_xxxxx).
### 2.克隆音色 ### 2. Clone the sound
克隆音色请参照教程 https://github.com/104gogo/huoshan-voice-copy To clone the voice, please refer to the tutorial https://github.com/104gogo/huoshan-voice-copy
准备一段 10-30 秒的音频文件(.wav格式)添加到克隆的项目中,将平台获得的密钥填入```uploadAndStatus.py```和```tts_http_demo.py``` Prepare a 10-30 second audio file (.wav format) and add it to the cloned project. Fill the key obtained from the platform into ```uploadAndStatus.py``` and ```tts_http_demo.py```
在uploadAndStatus.py中,将 audio_path=修改成自己的.wav文件名称 In uploadAndStatus.py, change audio_path= to your own .wav file name
```python ```Python
train(appid=appid, token=token, audio_path=r".\audios\xiaohe.wav", spk_id=spk_id) train(appid=appid, token=token, audio_path=r".\audios\xiaohe.wav", spk_id=spk_id)
``` ```
运行以下命令生成test_submit.mp3,点击播放试听克隆效果 Run the following command to generate test_submit.mp3 and click Play to listen to the cloned effect.
```python ```Python
python uploadAndStatus.py python uploadAndStatus.py
python tts_http_demo.py python tts_http_demo.py
``` ```
回到火山引擎控制台页面,刷新可以看到声音复刻详情的状态是复刻成功。 Go back to the Volcano Engine console page and refresh it to see that the status of the sound replication details is successful.
### 3.填写配置文件 ### 3. Fill in the configuration file
将火山引擎服务申请到的密钥填入.config.yaml的HuoshanDoubleStreamTTS配置文件中 Fill in the key applied for by the Volcano Engine service into the HuoshanDoubleStreamTTS configuration file in .config.yaml
修改 resource_id的参数为``` volc.megatts.default``` Modify the resource_id parameter to ``` volc.megatts.default```
(参考官方文档 https://www.volcengine.com/docs/6561/1329505) (See the official documentation at https://www.volcengine.com/docs/6561/1329505)
speaker的参数填入声音ID(S_xxxxx) Fill in the sound ID (S_xxxxx) of the speaker parameter
启动服务,唤醒小智发出的声音是克隆的音色即成功。 Start the service. If the sound produced by Xiaozhi when waking him up is the cloned one, it means success.