Qwen Audio & TTS

Supports OpenAI-compatible (binary audio) and Alibaba DashScope native (JSON passthrough) endpoints. Official Docs

[!NOTE] Example model IDs are for reference only; use actual IDs from the Model Marketplace.

Model & Route Quick Reference

ModelCapabilitiesOpenAI Compatible (Binary)DashScope Native (JSON)SpecsBilling
qwen-audio-3.1-tts-flashFast TTS, instructionsPOST /v1/audio/speechPOST /api/v1/services/audio/tts/SpeechSynthesizer3.1 voices; mp3/wav/pcm; 16000/24000/48000Input/output tokens
qwen-audio-3.1-tts-plusExpressive TTS, instructionsPOST /v1/audio/speechPOST /api/v1/services/audio/tts/SpeechSynthesizerSame as aboveChars (non-ASCII=2, ASCII=1)
qwen-audio-3.1-tts-nextFull-scene audio (dialogue/SFX/ambience/stereo/≤3 ref audio)POST /v1/audio/speechPOST /api/v1/services/audio/tts/SpeechSynthesizerPrompt/ref driven; wav/mp3/pcm; 24000/48000; 1/2chInput/output tokens

[!TIP] Use POST /v1/audio/speech for binary audio; use /api/v1/services/audio/tts/SpeechSynthesizer for native JSON (request_id/output.audio/usage) or DashScope SDKs. Auth: Authorization: Bearer sk-your_token.


1. Speech Synthesis 3.1 (qwen-audio-3.1-tts-flash / plus)

OpenAI Compatible (POST /v1/audio/speech)

curl -X POST https://www.roookey.com/v1/audio/speech \
  -H "Authorization: Bearer sk-your_token" \
  -H "Content-Type: application/json" -o output.mp3 \
  -d '{
    "model": "qwen-audio-3.1-tts-flash",
    "input": "Hello, welcome to Qwen TTS 3.1.",
    "voice": "longanhuan_v3.1",
    "response_format": "mp3",
    "sample_rate": 24000,
    "instructions": "Warm and natural, steady pace"
  }'
  • Switch model to qwen-audio-3.1-tts-plus for higher expressiveness; missing or OpenAI/Doubao voices fall back to longanhuan_v3.1; defaults to mp3/24000.

DashScope Native (POST /api/v1/services/audio/tts/SpeechSynthesizer)

curl -X POST https://www.roookey.com/api/v1/services/audio/tts/SpeechSynthesizer \
  -H "Authorization: Bearer sk-your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-audio-3.1-tts-flash",
    "input": { "text": "Hello, welcome to Qwen TTS 3.1.", "voice": "longanhuan_v3.1", "format": "mp3", "sample_rate": 24000, "instructions": "Warm and natural, steady pace" }
  }'
  • Passes through native JSON (request_id, output.audio.url/data, usage); plus bills by usage.characters (non-ASCII=2, ASCII=1).

2. Audio Generation (qwen-audio-3.1-tts-next)

Generates multi-speaker dialogue, narration, stereo ambience, and SFX with ≤3 optional reference audio clips.

OpenAI Compatible (POST /v1/audio/speech)

curl -X POST https://www.roookey.com/v1/audio/speech \
  -H "Authorization: Bearer sk-your_token" \
  -H "Content-Type: application/json" -o scene.wav \
  -d '{
    "model": "qwen-audio-3.1-tts-next",
    "input": "Rainy night cafe, @voice1 says warmly: Long time no see. Soft jazz piano fades in.",
    "audio_urls": ["https://example.com/voice.wav"],
    "response_format": "wav",
    "sample_rate": 48000,
    "channels": 2
  }'
  • audio_urls optional (≤3); defaults to wav/48000/channels: 2 (stereo, or 1 mono).

DashScope Native (POST /api/v1/services/audio/tts/SpeechSynthesizer)

curl -X POST https://www.roookey.com/api/v1/services/audio/tts/SpeechSynthesizer \
  -H "Authorization: Bearer sk-your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-audio-3.1-tts-next",
    "input": {
      "text_prompt": "Rainy street, @voice1 asks calmly: Plan confirmed? @voice2 smiles: Checked, launching tomorrow.",
      "references": [{ "audio_url": "https://example.com/a.wav" }, { "audio_url": "https://example.com/b.wav" }],
      "format": "wav", "sample_rate": 48000, "channels": 2
    }
  }'
  • Auto-converts @音频1–@音频3 to @voice1–@voice3, and prepends missing @voiceN tags when reference audio is supplied without mentions.

3. Voice Quick Reference

For flash/plus only (next is guided by prompts or references). The catalog below defaults to Qwen 3.1 with search, copy, and preview.

CategoryPopular Voices (Click to Copy)
Chinese FemaleLonganhuan longanhuan_v3.1 · Longanqian longanqian_v3.1 · Longanlingxin longanlingxin_v3.1 · Longanfengyue longanfengyue_v3.1 · Longanyun longanyun_v3.1
Chinese MaleXunanchuan xunanchuan_v3.1 · Longanran longanran_v3.1 · Longanyang longanyang_v3.1
English / MultilingualBeth beth_v3.1 · Betty betty_v3.1 · Cally cally_v3.1

5. Common Error Codes & Troubleshooting

For full HTTP codes, error body formats, and troubleshooting guides, see:

👉 Gateway Error Codes & Troubleshooting

Quick reference:

CodeMeaning
400Invalid parameters / content moderation or copyright block
402Insufficient account balance (not 429)
429RPS/RPM limits or in-flight task cap (low balance)
403Token / IP / model permission (balance → 402; content filter → 400)
200 + status: failedAsync video/long-task business failure on poll

HTTP status matches call log status_code for traceability by log_id.

Raw Markdown (.md) · llms.txt