请问iic/speech_sambert-hifigan_tts_zh-cn_16k模型如何离线部署

from modelscope.outputs import OutputKeys
from modelscope.pipelines import pipeline
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, voice='zhitian_emo')
wav = output[OutputKeys.OUTPUT_WAV]
with open('output.wav', 'wb') as f:
f.write(wav)
运行代码时,发现断网情况下无法正常使用

展开
收起
游客taeheo5yiccxi 2024-04-22 17:50:39 309 分享 版权
1 条回答
写回答
取消 提交回答

包括语音识别、语音合成、语音唤醒、声学设计及信号处理、声纹识别、音频事件检测等多个领域

热门讨论

热门文章

还有其他疑问?
咨询AI助理