User guide: For model introduction and selection recommendations, see Speech synthesis.
Model Studio has released a workspace-specific domain for the China (Beijing) region: https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com. The new dedicated domain delivers superior performance and higher stability for inference requests. We recommend migrating from https://dashscope.aliyuncs.com to the new domain.
{WorkspaceId} is your workspace ID, which can be found on the Workspace Details page in the Model Studio console. The existing domain remains fully functional.
task-started
When the client sends the run-task command, the server returns a task-started event to indicate the task has started.
|
header.task_id The task ID generated by the client. |
|
|
header.event The event type. Fixed value: |
|
|
payload Empty object with no content. |
result-generated
After the client sends text, the server streams result-generated events. Each event includes full timestamp data in output.sentence, with word-level and phoneme-level timestamps when the corresponding parameters are enabled.
|
header.task_id The task ID generated by the client. |
|
|
header.event The event type. Fixed value: |
|
|
payload.output The synthesized audio output. |
|
|
payload.usage Billing usage for the current event. |
task-finished
When the task is complete, the server returns a task-finished event. The client can then close the WebSocket connection or reuse the connection for a new task.
|
header.task_id The task ID generated by the client. |
|
|
header.event The event type. Fixed value: |
|
|
payload.usage.characters The cumulative billed character count up to the current event. |
task-failed
When a task fails, the server returns a task-failed event. Close the WebSocket connection and handle the error.
|
header.task_id The task ID generated by the client. |
|
|
header.event The event type. Fixed value: |
|
|
header.error_code The error code. |
|
|
header.error_message The detailed error message. |