语音合成 TTS
- 以下模型统一使用该接口:
qwen3-tts-flash、MiniMax/speech-2.8-turbo、MiniMax/speech-2.8-hd。 - 返回音频二进制,需按文件流保存。
调用示例
cURL
curl "https://api.example.com/v1/audio/speech" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-tts-flash",
"input": "你好,这是一个测试。",
"voice": "Cherry"
}' \
--output speech.wav模型与音色
qwen3-tts-flash
voice:
CherryMiniMax/speech-2.8-turbo
voice:
male-qn-qingseMiniMax/speech-2.8-hd
voice:
male-qn-qingse可选参数
- 可选参数
response_format:指定音频格式,例如mp3。 - 可选参数
speed:调整语速。
Last updated on