mirror of
https://www.modelscope.cn/iic/speech_sambert-hifigan_tts_zh-cn_16k.git
synced 2026-04-02 18:32:53 +08:00
update
This commit is contained in:
@ -102,7 +102,7 @@ widgets:
|
||||
* 各种语音合成任务,比如配音,虚拟主播,数字人等
|
||||
|
||||
### 如何使用
|
||||
目前仅支持有GPU硬件的Linux操作系统上使用,暂不支持Windows及Mac使用。在安装完成ModelScope-lib之后即可使用,支持的发音人名称请参考voices文件夹下面的voices.json
|
||||
目前仅支持在Linux操作系统上使用,暂不支持Windows及Mac使用。在安装完成ModelScope-lib之后即可使用,支持的发音人名称请参考voices文件夹下面的voices.json
|
||||
|
||||
#### 代码范例
|
||||
```Python
|
||||
@ -113,7 +113,7 @@ from modelscope.utils.constant import Tasks
|
||||
text = '待合成文本'
|
||||
model_id = 'damo/speech_sambert-hifigan_tts_zh-cn_16k'
|
||||
sambert_hifigan_tts = pipeline(task=Tasks.text_to_speech, model=model_id)
|
||||
output = sambert_hifigan_tts(input=text)
|
||||
output = sambert_hifigan_tts(input=text, voice='zhitian_emo')
|
||||
wav = output[OutputKeys.OUTPUT_WAV]
|
||||
with open('output.wav', 'wb') as f:
|
||||
f.write(wav)
|
||||
|
||||
Reference in New Issue
Block a user