This page describes a native (non-OpenAI) interface. It still works, but it is deprecated. New integrations should use the unified API.
The unified POST /v1/audio/speech reuses the same synthesis and billing, but supports only input, voice, response_format (mp3 / opus) and speed. model is only checked against the key allowlist: it does not switch to the paid Qwen models, and there are no pitch or subtitle options. If you need those, keep using the interface on this page.
What the unified API offers for this: Open the API guide
Text to Speech · IntroductionNEW
Text-to-Speech (TTS) API: send text, get a link to the synthesized speech (platform CDN direct link, mono 24kHz), optionally with a precisely aligned SRT subtitle file. Synchronous — one request returns the result directly, no polling and no taskId. 32 curated Chinese / English voices (322 in the full catalog), adjustable rate / pitch / volume, and per-sentence prosody control; long text is auto-segmented and stitched. Three output formats: mp3 / mp3-high / webm. Add a model field to the same endpoint to switch to the Qwen models (qwen-audio-3.1-tts-flash / qwen-audio-3.0-tts-flash / qwen-audio-3.0-tts-plus / qwen3-tts-flash): more natural voices, dialects, multiple languages, natural-language instructions and emotion tags, billed by actual usage — see the “Qwen models” tab.
Authorization
Request body
application/jsonzh-CN-XiaoxiaoNeuralmp3+0%+0Hz+0%falseedgeOutput formats
| format | File | Use case |
|---|---|---|
| mp3 | 24kHz 48kbps mono mp3 | General purpose, smallest size; use this for long text |
| mp3-high | 24kHz 96kbps mono mp3 | Better quality, roughly 2× the size |
| webm | 24kHz Opus (WebM) | Direct web playback; limited to 2000 characters per request |
Per-sentence control (segments)
Use segments instead of text to give each sentence its own rate / pitch / volume — e.g. a normal-paced opening, a slower and louder key sentence, then a quick wrap-up. Up to 200 segments.
- Fields omitted in a segment inherit the top-level value, so you only write what you want to change.
- All segments share one voice (voice is top-level only). A single request cannot mix voices — use separate requests for multiple characters.
- There is no pause tag between segments — the speech service cannot insert silence. Use punctuation for pauses, or split into multiple requests and stitch them yourself.
Subtitles (SRT)
Add "subtitle": true to the request and the response gains a subtitleUrl. The timeline is exact, not recognized — it comes from the word-boundary positions the speech engine reports while synthesizing, so there are no ASR typos and nothing drifts out of sync.
- No extra charge and no extra latency (the data falls out of synthesis itself).
- The text matches exactly what you sent (nothing is rewritten by recognition).
- Stays aligned after rate / segments changes the pace (the timeline shifts and the subtitle shifts with it).
- subtitle works with all three formats (the subtitle file is independent of the audio format).
- Use it for a web player’s <track kind="subtitles">, import into an editor, or pass subtitleUrl straight to the video subtitle burn-in endpoint (FFmpeg burn_subtitle).
Layout rules (fixed, not configurable yet): single line; up to ~20 Chinese characters / 40 Latin characters per line; each cue lasts 0.7–7 seconds; breaks at sentence-final punctuation and at pauses longer than 0.6 s. The file is standard SubRip, UTF-8 without BOM, LF line endings.
Supported voices
| Voice (shortName) | Name | Gender | Locale |
|---|
- The voice list is loaded live from GET /v1/tts/voices (the docs page shows curated voices by default; switch to “Full catalog” for all 322 across 142 locales). voice accepts any shortName listed there.
- For mixed Chinese/English text use AvaMultilingual / AndrewMultilingual — one voice reads both, no per-language switching.
- In ?all=1 the voices array may occasionally be empty (the catalog is still loading right after start-up); loadedAt is then an empty string — fall back to presets rather than treating it as “no voices”.
- The live API response is always authoritative.
Capability limits
The default channel controls voice + rate + pitch + volume. The following are not supported — do not port parameters from other TTS products:
| Not supported | Description |
|---|---|
| Emotional styles (cheerful, sad, angry…) | Not on the default channel; use a Qwen qwen-audio-3.x model (emotion tags + instruction) |
| Role play (role) | Same as above |
| Inserted silence / pause tags | Use punctuation, or split into several requests and stitch them yourself |
| Multiple voices in one request | One voice per request; use separate requests for multiple characters |
| Raw SSML pass-through | The request body only accepts the documented fields, not custom SSML |
| Number / date reading, phoneme hints | say-as / phoneme are not supported |
Models
Same endpoint, POST /v1/tts — add model to the request to switch to a Qwen model: more natural voices, dialects, multiple languages and emotion control. Omit model (or send edge) and you get the default channel (see its tab), unchanged. model is case-sensitive and must match the table exactly.
| model | Billing (actual usage) | format | Default voice | Extra params |
|---|---|---|---|---|
| qwen-audio-3.1-tts-flash | Input 150 / output 1200 credits per 1M tokens | mp3 (default) / wav | longanhuan_v3.1 | instruction, sampleRate |
| qwen-audio-3.0-tts-flash | 100 credits / 10k characters | mp3 (default) / wav | longanhuan_v3.6 | instruction, sampleRate |
| qwen-audio-3.0-tts-plus | 140 credits / 10k characters | mp3 (default) / wav | longanlingxin | instruction, sampleRate |
| qwen3-tts-flash | 80 credits / 10k characters | wav | Cherry | language |
Request Parameters
Voices (voice)
Multilingual & dialects (Shanghai / Cantonese / Northeastern / Chongqing / Shaanxi / Yunnan / Ningbo / Gansu; ja / ko / fr / de / pt / it / vi / id): longanhuan_v3.1 (female · default), longanlingxin_v3.1 (female), longanfengyue_v3.1 (female), xunanchuan_v3.1 (male)
Premium Chinese (Mandarin only): yuxiaoyun_v3.1, qiaoxiaojiao_v3.1, xiaxiaochen_v3.1, anmingyuan_v3.1 (male), wenhuaiqing_v3.1, anxiaolan_v3.1, xieshurou_v3.1, baiqinglan_v3.1, xuyuyuan_v3.1, anruorou_v3.1, wenhuaizhi_v3.1, xiaoxingzhi_v3.1, guyunshu_v3.1, huozhuoshi_v3.1 (male), yeqinghe_v3.1, yunhuanhuan_v3.1, xuxiaoqiao_v3.1, baianran_v3.1, xuyanchu_v3.1, yezhiqing_v3.1, andi_v3.1 (male · ABC accent), anyuqing_v3.1
Premium English (English only): Emily_v3.1 (British), Luna_v3.1 (British), Eric_v3.1 (British), Luca_v3.1 (British), Abby_v3.1 (American), Annie_v3.1 (American), Ava_v3.1 (American), Beth_v3.1 (American), Betty_v3.1 (American), Cally_v3.1 (American), Cindy_v3.1 (American), Donna_v3.1 (American), Andy_v3.1 (American), Brian_v3.1 (American), David_v3.1 (American)
Others: longanyuanfei_v3.1, longjielidou_v3.1 (boy), longanlingxi_v3.1, longhuohuo_v3.1 (teen), longyingtao_v3.1, longanya_v3.1, longwan_v3.1, longxing_v3.1, longhua_v3.1, longhan_v3.1 (male), longanzhi_v3.1 (male), longzhe_v3.1 (male), longanyang_v3.1 (male), libai_v3.1 (poetry recitation), longling_v3.1, longniuniu_v3.1, longshanshan_v3.1, longpaopao_v3.1, loongstella_v3.1, longyuan_v3.1, longmiao_v3.1, longsanshu_v3.1 (male), longanli_v3.1, longanwen_v3.1, longanlang_v3.1 (male), longxiaoxia_v3.1, longanchong_v3.1 (male · live commerce)
longanhuan_v3.6 (default), longanfengyue, longanyuanfei, longanlingxi, longanxiaoxin, longjielidou_v3.6, longpaopao_v3.6, longhuohuo_v3.6, longchuanshu_v3.6, loongmary, loongeva_v3.6, loongjohn
longanlingxin (default), longanlufeng
The two 3.0 models also have 500+ base voices named qwen-audio-3.0-tts-{plus|flash}-{suffix}; use them the same way (matching the model).
Cherry (default), Serena, Ethan, Chelsie, Momo, Vivian, Moon, Maia, Kai, Nofish, Bella, Jennifer, Ryan, Katerina, Aiden, Eldric Sage, Mia, Mochi, Bellona, Vincent, Bunny, Neil, Elias, Arthur, Nini, Ebona, Seren, Pip, Stella, Bodega, Sonrisa, Alek, Dolce, Sohee, Ono Anna, Lenn, Emilien, Andre, Radio Gol, Jada (Shanghainese), Dylan (Beijing dialect), Li (Nanjing dialect), Marcus (Shaanxi dialect), Roy (Hokkien), Peter (Tianjin dialect), Sunny (Sichuanese), Eric (Sichuanese), Rocky (Cantonese), Kiki (Cantonese)
All 49 above are verified. Names with spaces (e.g. Eldric Sage) are sent as-is.
Emotion / sound tags (qwen-audio-3.x only, written inside text)
- Control (applies to the text after it, until the next control tag):
[sad][amazed][angry][excited][sarcastic][curious][bored][tired][scornful][shouting][deep and loud shouting][trembling][like dracula][asmr][panicked][mischievously][empathetic][whispers][reluctantly][crying][serious][very slowly][very fast] - Sound (inserts an effect at that position):
[gasp][sighing][clears throat][giggles][laughing][cough][snorts]
Response Fields
💰 See the pricing page for prices →
Common Errors
| Code | msg | Meaning |
|---|---|---|
| 401 | unauthorized | Missing valid credentials |
| 400 | invalid JSON | Request body is not valid JSON |
| 400 | text required | No text provided (both text and segments are empty) |
| 400 | text and segments are mutually exclusive; send one | Send only one of the two fields |
| 400 | segments contain no text | Every segment’s text is blank |
| 400 | too many segments (max 200) | More than the 200-segment limit |
| 400 | unsupported voice | Voice not in the supported list |
| 400 | unsupported format "xxx"; want one of mp3, mp3-high, webm | Invalid format value |
| 400 | invalid rate/pitch/volume "xxx" (segments[N]); want … | Malformed rate / pitch / volume — the message states the expected shape and which segment failed |
| 400 | format "webm" cannot be concatenated, so it is limited to 2000 characters … | webm text too long — see “Output formats” |
| 400 | edge tts rejected the request: … | The speech service rejected the content (should not normally happen — please report it) |
| 400 | unsupported model | model is neither edge nor a Qwen model id (case-sensitive) |
| 400 | instruction/sampleRate/language require a paid model | Qwen-model-only params sent to the default channel |
| 400 | pitch must be a string like "+5Hz" for the default model | Default-channel pitch sent as a number |
| 400 | segments/rate/volume/subtitle are not supported by … | Default-channel-only params sent to a Qwen model |
| 400 | xxx is not supported by … | This Qwen model does not accept the param (see “Extra params” in the model table) |
| 400 | unsupported format for … (…) | format not supported by this Qwen model |
| 400 | voice … belongs to …, not … | The voice belongs to another Qwen model (e.g. a 3.0 voice on 3.1); see GET /v1/tts/voices?model= for valid voices |
| 400 | InvalidParameter: … | Invalid Qwen-model parameter (e.g. a voice the model does not support) |
| 429 | rate limited, retry later | Qwen model rate-limited, retry later (nothing charged) |
| 503 | model unavailable | Qwen models are currently unavailable |
| 413 | text too long | Request body exceeds the 256KB limit |
| 402 | insufficient balance | Insufficient balance (nothing charged, no link returned) |
| 502 | tts synthesis failed | Synthesis temporarily unavailable — safe to retry (nothing charged) |
| 500 | upload failed | Result upload failed, retry (nothing charged) |