
Real-time speech synthesis with 19 voices, delivery direction in plain language, inline emotion and sound tags, and audio streamed over SSE or WebSocket.
Real-time speech synthesis with 19 voices, delivery direction in plain language, inline emotion and sound tags, and audio streamed over SSE or WebSocket.
Choose one of 19 voices with voice. Direct the delivery with instruction and with inline tags inside the text. Speed and pitch change the rendered length without changing billed tokens.
Also known as Qwen Audio TTS, Alibaba Cloud Qwen Audio 3.1 TTS
qwen-audio-3-1-tts/v1/audio/speechPOST/v1/audio/speech:streamWEBSOCKET/v1/realtimeqwen-audio-3.1-ttsqwen-audio-3.1-tts-flashalibaba/qwen-audio-3-1-ttsLive pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.
Qwen Audio 3.1 TTS serves speech through POST /v1/audio/speech and returns playable audio. Send the text to speak as input with the model id qwen-audio-3-1-tts. Get an API key from the EmpirioLabs dashboard.
curl https://api.empiriolabs.ai/v1/audio/speech \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-audio-3-1-tts",
"input": "Welcome to EmpirioLabs. Your build just finished."
}' \
--output speech.mp3import requests
response = requests.post(
"https://api.empiriolabs.ai/v1/audio/speech",
headers={"Authorization": "Bearer YOUR_EMPIRIOLABS_API_KEY"},
json={"model": "qwen-audio-3-1-tts", "input": "Welcome to EmpirioLabs."},
)
with open("speech.mp3", "wb") as f:
f.write(response.content)Request parameters supported by the Qwen Audio 3.1 TTS API on EmpirioLabs. Defaults apply when a field is omitted.
| Parameter | Type | Default | Range / values | Description |
|---|---|---|---|---|
| input | string | - | max 10000 | Text to synthesize, up to 10,000 characters per request. These inline tags change the delivery from the point where they appear: [sad], [amazed], [deep and loud... |
| voice | enum | Emily_v3.1 | Emily_v3.1, Luna_v3.1, Eric_v3.1, Luca_v3.1, Abby_v3.1, Annie... | Voice preset. The 15 English voices read English, and the 4 multilingual voices read Chinese, English, and other languages. Every voice id ends in _v3.1, for example... |
| response_format | enum | mp3 | mp3, wav, pcm, opus | Audio container. mp3 and opus are compressed, wav is uncompressed PCM in a RIFF header, and pcm is headerless raw samples for chunked playback. |
| sample_rate | enum | 24000 | 8000, 12000, 16000, 22050, 24000, 44100, 48000 | Output sample rate in Hz. 24000 suits speech playback, and 48000 gives broadcast-quality output at a larger file size. |
| speed | number | 1 | 0.5 to 2 | Speaking rate multiplier. 0.5 is half speed and 2.0 is double speed. |
| pitch | number | 1 | 0.5 to 2 | Pitch multiplier. Values below 1.0 lower the voice and values above raise it. Pitch also shifts the pace of the rendered audio, so pair it with speed when you want... |
| volume | integer | 50 | 0 to 100 | Output loudness, where 50 is the reference level. |
| instruction | string | - | max 1000 | Natural-language direction for delivery, up to 1,000 characters. Controls emotion, tone, character, pace, and speaking style, for example 'Speak quickly in an... |
| language_hints | array | - | zh, en, fr, de, ja, ko, ru, pt, th, id, vi, es, it, ms, fil, ar | Language codes that bias pronunciation for mixed-language text, for example ["zh", "en"]. Leave unset to let the model detect the language. |
| seed | integer | 0 | 0 to 65535 | Sampling seed. Reuse a seed with identical input and settings for a repeatable render. |
| bit_rate | integer | 32000 | 6000 to 510000 | Encoder bitrate in bps. Applies to the opus format only, and is ignored for mp3, wav, and pcm. |
| pronunciation | object | - | - | Pronunciation overrides keyed by the written form, for example {"重要": "zhong4 yao4"}. Use it to fix names, acronyms, and homographs. |
| replace | object | - | - | Literal text substitutions applied before synthesis, for example {"EmpirioLabs": "Empirio Labs"}. Useful for brand names and abbreviations. |
| enable_markdown_filter | boolean | false | - | Strip Markdown syntax such as asterisks and underscores before synthesis so formatting characters are not read aloud. |
On EmpirioLabs, Qwen Audio 3.1 TTS is billed pay as you go: Input $0.46 per 1M prompt tokens; Output $3.74 per 1M generated tokens. The live rate card on this page always matches what the API charges.
Qwen Audio 3.1 TTS is served through POST /v1/audio/speech on api.empiriolabs.ai with standard bearer-token authentication.
Open the EmpirioLabs playground and press Start session to try it in your browser. Qwen Audio 3.1 TTS runs over a WebSocket rather than a request and response, so to build with it start from the realtime voice quickstart. Connect from your server with your EmpirioLabs API key and the model id qwen-audio-3-1-tts, then stream audio in both directions.
Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make.
Check out our pricing or reach out if you want your own model deployed on our stack.