开发者社区 > ModelScope模型即服务 > 语音 > 正文

语音情感合成

情感标签分别是怎么对应的

展开
收起
少年游aaaaa 2022-11-25 15:39:43 1105 0
2 条回答
写回答
取消 提交回答
  • from scipy.io.wavfile import write

    from modelscope.outputs import OutputKeys from modelscope.pipelines import pipeline from modelscope.utils.constant import Tasks

    text = '待合成文本' model_id = 'damo/speech_sambert-hifigan_tts_zhizhe_emo_zh-cn_16k' sambert_hifigan_tts = pipeline(task=Tasks.text_to_speech, model=model_id) output = sambert_hifigan_tts(input=text) pcm = output[OutputKeys.OUTPUT_PCM] write('output.wav', 16000, pcm)

    使用modelscope时如何传入情感标签,我按照源码的参数传入,好像不起作用 output = sambert_hifigan_tts(input=text, inputs_emotion=5)

    2022-11-26 11:05:50
    赞同 展开评论 打赏
  • 请参考https://help.aliyun.com/document_detail/101645.html#sectiondiv-g6w-isw-rmw

    使用SSML emotion标签即可实现添加情感标签。

    2022-11-25 22:08:20
    赞同 展开评论 打赏

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

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载