Text to Speech
Call Ali qwen3-tts-instruct-flash through the unified /v1/audio/speech endpoint.
Response contract:
- non-streaming returns the official Ali JSON response;
- streaming returns
text/event-streamand forwards Ali SSE payloads.
Authorizations
Pass Authorization: Bearer <token> in the request header.
Headers
Official Ali HTTP streaming switch. Send enable to receive text/event-stream.
enable Body
Model name. Available options: qwen3-tts-instruct-flash.
qwen3-tts-instruct-flash Text to synthesize. This field accepts multilingual input.
Voice to use. See supported system voices.
Cherry, Serena, Ethan, Chelsie, Momo, Vivian, Moon, Maia, Kai, Nofish, Bella, Eldric Sage, Mia, Mochi, Bellona, Vincent, Bunny, Neil, Elias, Arthur, Nini, Seren, Pip, Stella Sets instructions. See instruction control.
Default: none, no effect when not set. Maximum length: 1600 tokens. Supported languages: Chinese and English only. Scope: This feature is only supported by the qwen3-TTS-Instruct-Flash-Realtime series models.
Optimizes instructions semantically to improve the naturalness and expressiveness of voice synthesis.
Default: false.
Behavior: When set to true, the system semantically enhances and rewrites the instructions content to generate internal instructions better suited for voice synthesis.
Recommended for high-quality, refined voice expression.
Depends on the instructions parameter. If instructions is empty, this parameter has no effect.
Scope: This feature is only supported by the qwen3-TTS-Instruct-Flash series models.
Language type for the synthesized audio. Defaults to Auto.
Auto: Suitable when the text contains multiple languages or the language is uncertain. The model automatically matches pronunciation for different language segments, but accuracy is not guaranteed.- Specified language: Suitable for single-language text. Specifying a language significantly improves synthesis quality, generally outperforming
Auto.
Auto, Chinese, English, German, Italian, Portuguese, Spanish, Japanese, Korean, French, Russian Response
Successful call. Non-streaming returns the official Ali JSON response; streaming returns Ali SSE payloads.
HTTP status code. Follows RFC 9110 definitions. For example:
- 200: Request successful, normal response returned
- 400: Client request parameter error
- 401: Unauthorized access
- 404: Resource not found
- 500: Internal server error
Unique request identifier for this request, useful for troubleshooting.
Error code. Returned when the request fails.
Error message. Returned when the request fails.
Model output.
Token or character consumption for this request. qwen-TTS returns token consumption information, while qwen3-TTS-Flash returns character consumption information.