User guide: For model introduction and selection recommendations, see Speech synthesis.
task-started
After the client sends the run-task command, the server returns a task-started event to signal that the task has started. The client can send subsequent commands only after receiving this event.
|
header.task_id The task ID generated by the client. |
|
|
header.event Event type. Fixed value: |
|
|
payload Empty object. |
result-generated
After the client sends text, the server continuously returns result-generated events. Each event carries sentence-level metadata.
|
header.task_id The task ID generated by the client. |
sentence-begin
sentence-synthesis
sentence-end
|
|
header.event Event type. Fixed value: |
|
|
payload.output Output information. |
|
|
payload.usage Billing information, returned in the sentence-end event. |
task-finished
The server returns a task-finished event when the task completes. The client can then close the WebSocket connection or reuse it to start a new task.
|
header.task_id The task ID generated by the client. |
|
|
header.event Event type. Fixed value: |
|
|
payload.usage.characters Cumulative number of billed characters. |
task-failed
The server returns a task-failed event when the task fails. On receiving this event, the client must close the WebSocket connection and handle the error.
|
header.task_id The task ID generated by the client. |
|
|
header.event Event type. Fixed value: |
|
|
header.error_code Error code. |
|
|
header.error_message Detailed error message. |