无人直播语音合成服务-阿里云sambert大模型

无人直播的使用场景下,我们需要一个效果不错的语音合成服务

阿里云sambert

https://help.aliyun.com/zh/dashscope/developer-reference/quick-start-13
Sambert系列模型 1万字1元 ,每主账号每模型每月3万字免费,

创建API-KEY

https://dashscope.console.aliyun.com/apiKey

调用代码生成音频文件

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())
复制代码

联系方式

vx:  llike620

 
posted @   唯一客服系统开发笔记  阅读(48)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
历史上的今天:
2020-05-25 [Go]当把json解析到interface{}时 , 对应的真正类型
2016-05-25 [javaSE] 网络编程(浏览器客户端-自定义服务端)
点击右上角即可分享
微信分享提示
1
chat with us