Qwen Audio 3.1 TTS

Alibaba Cloud · Audio Generation
POST /v1/audio/speechReal-time speech synthesis with 19 voices, delivery direction in plain language, inline emotion and sound tags, and audio streamed over SSE or WebSocket.
See Qwen Audio 3.1 TTS pricing and specs or try it in the Playground.
At a glance
Pricing
Example request
Parameters
Notes
Voices
- 19 voices: 15 English voices and 4 multilingual voices. Emily, Luna, Eric, and Luca have British accents. Abby, Annie, Ava, Beth, Betty, Cally, Cindy, Donna, Andy, Brian, and David have American accents. The multilingual voices
longanhuan_v3.1,longanlingxin_v3.1,longanfengyue_v3.1, andxunanchuan_v3.1read Chinese, English, and other languages. - Every voice id ends in
_v3.1, for exampleEmily_v3.1.
Custom voices
- Set
voicetocustomand passvoice_audio_url, an https URL to 10 to 20 seconds of clear speech from one speaker. - WAV, MP3, M4A, OGG, WEBM and FLAC are accepted, up to 15 MB. Record in a quiet room, without music or other voices.
- The response includes
voice_idandvoice_id_expires_at. Pass thevoice_idasvoiceto reuse the voice for 7 days, onPOST /v1/audio/speech,POST /v1/audio/speech:streamor the realtime socket, wheresession.updatetakes the same fields andsession.updatedreturns thevoice_id. Only the account that created it can use it. - Each account can hold 10 custom voices on this model at a time.
GET /v1/voices?model=qwen-audio-3-1-ttslists the model’s voices, including your custom voices with their ids. Addtype=customto list custom voices alone.DELETE /v1/voices/{voice_id}?model=qwen-audio-3-1-ttsdeletes a custom voice, which frees its place at once.- In the Playground, set Voice to Custom to use a saved voice again, copy its id, or delete it.
- Creating, listing and deleting custom voices adds no charge.
Delivery direction
instructionsets emotion, tone, character, pace, and speaking style in natural language, up to 1,000 characters.- Inline tags inside the text change the delivery from that point, for example
[excited]or[whispers], or add a one-time sound such as[laughing]or[sighing]. The full list of tags is on theinputparameter. - SSML input is not supported.
Input limits
- Up to 10,000 characters per request.
language_hintsbiases pronunciation for mixed-language text.
Output
- MP3, WAV, PCM, or Opus at 8,000 to 48,000 Hz.
POST /v1/audio/speech:streamsends audio chunks while the speech is generated.
Realtime
WEBSOCKET /v1/realtime?model=qwen-audio-3-1-ttstakes text while it is still being written and returns audio as it is generated. Sendinput_text_buffer.appendevents, theninput_text_buffer.commit, orsession.finishto end the session.- Audio arrives in
response.audio.deltaevents: 16-bit PCM at 24,000 Hz by default, or MP3 or Opus. Set the voice, instruction, format and other options withsession.update; a change applies from the next segment. - Text is spoken in segments that end at sentence boundaries, and each segment ends with a
response.doneevent carrying its usage.
Billing
- Input tokens are the text, and output tokens are the generated audio at 12.5 tokens per second.
- Speed and pitch change the length of the rendered audio but not the billed tokens. An instruction that slows the delivery adds output tokens.
Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/qwen-audio-3-1-tts.
