"ModelScope用的GPU跑不起来,怎么处理?
from scipy.io.wavfile import write
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from modelscope.outputs import OutputKeys
text = '今天北京天气怎么样?'
sambert_hifigan_tts =pipeline(
task=Tasks.text_to_speech, model='damo/speech_sambert-hifigan_tts_zhizhe_emo_zh-cn_16k')
output = sambert_hifigan_tts(input=text)
pcm = output[OutputKeys.OUTPUT_PCM]
write('output.wav', 16000, pcm)"
"https://www.modelscope.cn/models/iic/speech_sambert-hifigan_tts_zhizhe_emo_zh-cn_16k/summary
此回答整理自钉群“魔搭ModelScope开发者联盟群 ①”
ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352