Qwen-Audio-3.1-TTS
NEW复制成功!
概述
Qwen-Audio-3.1-TTS-Flash是面向实时交互场景的高性能语音合成大模型,支持多种语言和方言。该模型具有free-style指令遵循能力和细粒度标签控制能力,可更灵活地控制情绪、语气、角色、语速、音量等表达方式。同时,模型在声音复刻场景中,对于噪声、混响等复杂声学条件下具备更强鲁棒性,提升了音质、清晰度和整体表现力。Flash 版本重点优化实时合成体验,适用于语音助手、实时对话、智能客服等低延迟交互场景。
输入
文本
输出
音频
功能
定价
- 输入¥1.5/M tokens
- 输出¥12/M tokens
速率限制
- 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://maas.qianwenaiapi.com/api-ws/v1/inference'
model = "qwen-audio-3.1-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)