Qwen-Audio-TTS
复制成功!
概述
Qwen-Audio-3.0-TTS-Flash是面向实时交互场景优化的高性能语音合成大模型。相比前一版本,模型支持更多小语种和中文方言,提升了方言发音的正宗程度,并增强了 free-style 指令遵循能力和细粒度标签控制能力,可更灵活地控制情绪、语气、角色、语速、音量等表达方式。同时,模型在噪声、混响等复杂声学条件下具备更强鲁棒性,提升了音质、清晰度和整体表现力。Flash 版本重点优化实时合成体验,适用于语音助手、实时对话、智能客服等低延迟交互场景。
输入
文本
输出
音频
功能
定价
- 语音合成¥1每万字符
速率限制
- RPM每分钟请求数180
API 参考
调用API复制成功!
1234567891011121314151617181920
# coding=utf-8
import dashscope
from dashscope.audio.tts_v2 import *
# If the API Key is not configured in the environment variable, your-api-key needs to be replaced with your own API Key
# dashscope.api_key = "your-api-key"
dashscope.base_websocket_api_url='wss://dashscope.aliyuncs.com/api-ws/v1/inference'
model = "qwen-audio-3.0-tts-flash"
#Please enter the correct voice below.
voice = ""
synthesizer = SpeechSynthesizer(model=model, voice=voice)
audio = synthesizer.call("How is the weather today?")
with open('output.mp3', 'wb') as f:
f.write(audio)