The DashScope Python SDK uses
MultiModalConversation instead of SpeechSynthesizer. Usage and parameters are identical.Authorizations
string
header
required
DashScope API key. Get your API key from Qwen Cloud console.
Header Parameters
enum<string>
Set to enable for streaming output via HTTP. The Python SDK uses the stream parameter instead. The Java SDK uses the streamCall interface instead.
enable
Response
200-application/json
integer
HTTP status code. Examples: 200 (success), 400 (client error), 401 (unauthorized), 404 (not found), 500 (server error).
200
string
The unique ID of the request. Use it to locate and troubleshoot issues.
5c63c65c-cad8-4bf4-959d-xxxxxxxxxxxx
string
Displays the error code when the request fails. See Error codes.
string
Displays the error message when the request fails. See Error codes.
object
The model's output.
object
Token or character consumption information. Qwen-TTS returns token consumption. Qwen3-TTS-Flash returns character consumption.