Non-real-time speech synthesis converts text to speech through the HTTP API. It is designed for latency-tolerant scenarios such as audiobook production, online education voiceovers, and content creation, and supports a wide range of voices, multiple languages, voice cloning, and voice design.
Convert complete text into audio files through the HTTP API. Two output modes are available: non-streaming and streaming.
Before you begin, complete the following preparations:
The following examples synthesize speech with qwen-audio-3.0-tts-flash and the system voice
Instruction specifications by model:
This section describes how to generate speech in Chinese dialects (such as Henan dialect and Sichuan dialect). The configuration method varies by model and voice type.
Different models support different voices. Set the
A: The audio file URL is valid for 24 hours after generation. After the URL expires, call the API again to obtain a new URL.
Overview
Convert complete text into audio files through the HTTP API. Two output modes are available: non-streaming and streaming.
- Non-streaming returns an audio file URL valid for 24 hours; streaming returns audio data in chunks.
- Multiple languages are supported, including Chinese dialects.
- Supports Voice cloning and Voice Design for creating custom voices.
- Supports Instruction control to control speech expressiveness through natural language instructions.
Audio synthesized on the Voice Design page in the Model Studio console can only be previewed online and cannot be downloaded as an audio file. To download the audio, call the API or the SDK.
Prerequisites
Before you begin, complete the following preparations:
- Configure an API key and set it as an environment variable
- (Optional) If you call the API through the DashScope SDK, install the latest SDK
Quick start
The following examples synthesize speech with qwen-audio-3.0-tts-flash and the system voice longanhuan_v3.6. For other available voices, see the voice list.
These examples use the Singapore region. Replace {WorkspaceId} with your workspace ID in this region, and set the DASHSCOPE_API_KEY environment variable to an API key from the same region.
- Non-streaming output
- Streaming output
In non-streaming mode,
output.audio.url contains the download URL for the synthesized audio.Advanced features
Instruction control
Instruction specifications by model:
Dialects
This section describes how to generate speech in Chinese dialects (such as Henan dialect and Sichuan dialect). The configuration method varies by model and voice type.
- Qwen-TTS
- System voices: Use system voices that support dialects. See Qwen-TTS voice list.
Supported models and regions
- Singapore
- China (Beijing)
To call the following models, use an API key for the Singapore region:
-
Qwen-TTS:
- Qwen3-TTS-Flash: qwen3-tts-flash (stable version)
Supported system voices
Different models support different voices. Set the voice request parameter to a value from the voice parameter column in the following tables.