阿里云语音合成TTS直播助手软件开发

阿里云的 TTS 比较便宜,效果比不了开源克隆的那种,比纯机器人效果好一点点

阿里云 sambert#

help.aliyun.com/zh/dashscope/devel...

Sambert 系列模型 1 万字 1 元 ,每主账号每模型每月 3 万字免费

创建 API-KEY#

dashscope.console.aliyun.com/apiKe...

调用代码生成音频文件#

pip install dashscope

import dashscope
from dashscope.audio.tts import SpeechSynthesizer

dashscope.api_key='sk-xxx'

result = SpeechSynthesizer.call(model='sambert-zhimao-v1',
                                text='今天天气怎么样',
                                sample_rate=48000)
if result.get_audio_data() is not None:
    with open('output.wav', 'wb') as f:
        f.write(result.get_audio_data())

整合成工具软件#

适合直播场景下的循环播放录音

适合在循环录音队列里,临时插队播放录音

适合 AI 合成语音,使用阿里云 TTS 合成语音

阿里云语音合成TTS直播助手软件开发

联系方式#

vx: llike620

本作品采用《CC 协议》,转载必须注明作者和本文链接