This topic describes the client events for the Qwen-TTS Realtime API.
Reference: Real-time speech synthesis - Qwen.
session.update
Use this event to update the session configuration. Send this event as the first step of interaction after the WebSocket connection is established. If you do not send this event, the system uses the default configurations. After the server successfully processes this event, it returns a session.updated event as confirmation.
|
event_id A unique event ID that the client generates. The ID must be unique within a single WebSocket connection session. Use a Universally Unique Identifier (UUID). |
|
|
type The event type. The value is fixed to |
|
|
session The session configuration. |
input_text_buffer.append
Appends text for synthesis to the text buffer. In `server_commit` mode, the text is appended to the server-side text buffer. In `commit` mode, the text is appended to the client-side text buffer.
|
event_id A unique event ID that the client generates. The ID must be unique within a single WebSocket connection session. Use a Universally Unique Identifier (UUID). |
|
|
type The event type. The value is fixed to |
|
|
text The text to be synthesized. |
input_text_buffer.commit
Commits the user input text buffer to create a new user message item in the conversation. If the input text buffer is empty, this event causes a fault. In `server_commit` mode, submitting this event immediately synthesizes all previous text, and the server stops caching the text. In `commit` mode, the client must commit the text buffer to create a user message item. Committing the input text buffer does not create a response from the model. The server responds with an input_text_buffer.committed event.
|
event_id A unique event ID that the client generates. The ID must be unique within a single WebSocket connection session. Use a Universally Unique Identifier (UUID). |
|
|
type The event type. The value is fixed to |
input_text_buffer.clear
Clears the text in the buffer. The server responds with an input_text_buffer.cleared event.
|
event_id A unique event ID that the client generates. The ID must be unique within a single WebSocket connection session. Use a Universally Unique Identifier (UUID). |
|
|
type The event type. The value is fixed to |
session.finish
The client sends a session.finish event to notify the server that there is no more text input. The server returns the remaining audio and then closes the connection.
|
event_id A unique event ID that the client generates. The ID must be unique within a single WebSocket connection session. Use a Universally Unique Identifier (UUID). |
|
|
type The event type. The value is fixed to |