This topic describes the client events for the qwen3.5-livetranslate-flash-realtime API.
Reference: Real-time audio and video translation - Qwen .
session.update
Send this event after establishing a WebSocket connection to update the default session configuration. The server validates parameters and returns either an error (if invalid) or the updated configuration (if valid).
typestring(Required)Event type. Must be set to session.update.sessionobject(Optional)The session configuration.
Properties modalities array(Optional)Output modalities. Valid values:
string(Optional)Voice for generated audio. When voice cloning is disabled, set this to a system preset voice. Valid values: Supported voices. Default value: Tina for Qwen3.5-LiveTranslate-Flash-Realtime, or Cherry for Qwen3-LiveTranslate-Flash-Realtime.Whenenable_voice_clone boolean(Optional)Whether to enable voice cloning. Default value: false. When enabled, the model clones the speaker's voice from the input audio for translated output. In this case, voice no longer accepts system preset voices and must be set to default or a voice ID previously created through the Voice Clone API.voice_clone_optionsobject(Optional)Voice clone control options. Takes effect only when enable_voice_clone is true.
Properties voice_clone_options.frequency string(Optional)Voice cloning frequency. Valid values:
integer(Optional)Input audio sample rate, in Hz. Valid values:
object(Optional)Configuration for input audio.
Properties model string(Optional)Speech recognition model. If configured, the server returns both the recognition result (original source language text) and translation via the conversation.item.input_audio_transcription.text and conversation.item.input_audio_transcription.completed events.Valid value: qwen3-asr-flash-realtime.languagestring(Optional)Source language for translation. Valid values: Supported languages. If not specified, the model automatically detects the source language.string(Optional)Input audio format. Valid values:
string(Optional)Output audio format. Currently, this parameter can only be set to pcm.turn_detectionobject(Optional)Voice Activity Detection (VAD) configuration, used to control how speech start and end are detected:
Properties type string(Optional)VAD type. Must be set to server_vad.thresholdfloat(Optional)VAD detection sensitivity. A lower value makes it easier to recognize faint sounds (including background noise) as speech; a higher value requires clearer, louder speech to trigger detection.Value range: [-1.0, 1.0]. Default value: 0.2.silence_duration_msinteger(Optional)Minimum duration of silence (in milliseconds) required after speech ends. Once this duration is exceeded, the server determines that speech has ended, automatically commits the audio buffer, and triggers a translation response.Value range: [200, 6000]. Default value: 1000.object(Optional)Translation configuration.
Properties language string(Optional)Target language for translation. Valid values: Supported languages. Default value: en.same_language_skip_optionsobject(Optional)Same-language output configuration. When the source and target languages are the same, the service can skip text output, audio output, or both. This parameter takes effect only when translation.language is set to zh or en.
Properties skip_text boolean(Optional)Specifies whether to skip text output when the source and target languages are the same.skip_audioboolean(Optional)Specifies whether to skip audio output when the source and target languages are the same.object(Optional)Hot-word configuration to improve translation accuracy for specific terms.
Properties phrases object(Optional)Hot-word mapping. The key is the term in the source language, and the value is its target-language translation.Example: {"AI": "Artificial Intelligence"} | frequency=once): |
input_audio_buffer.append
Appends audio bytes to the input audio buffer. The service uses this buffer to detect speech and determine when to submit it.
typestring(Required)Event type. Must be set to input_audio_buffer.append.audiostring(Required)Base64-encoded audio data. |
input_audio_buffer.commit
Commits the input audio buffer. This event only needs to be sent in Manual mode (turn_detection set to null). In VAD mode, the server commits automatically and the client does not need to send this event.
Upon receiving this event, the server returns an input_audio_buffer.committed event as confirmation and automatically starts generating a translation response (no additional event is needed to trigger the response). If the audio buffer is empty, the server returns an error event.
typestring(Required)Event type. Must be set to input_audio_buffer.commit. |
input_audio_buffer.clear
Clears uncommitted audio data from the input audio buffer.
typestring(Required)Event type. Must be set to input_audio_buffer.clear. |
input_image_buffer.append
Adds image data to the image buffer from a local file or real-time video stream.
Image input limits:
- Image format: JPG or JPEG. Recommended resolution for optimal performance: 480p or 720p (maximum: 1080p).
- Maximum image size: 500 KB (before Base64 encoding).
- Image data must be Base64-encoded.
- Maximum frequency: 2 images per second.
- Send at least one input_audio_buffer.append event before sending input_image_buffer.append.
typestring(Required)Event type. Must be set to input_image_buffer.append.imagestring(Required)Base64-encoded image data. |
session.finish
Send this event to end the current session. Server responses:
- If speech is detected: Server completes speech recognition, sends conversation.item.input_audio_transcription.completed with the recognition result, then sends session.finished to indicate session end.
- If no speech is detected: Server sends session.finished directly.
typestring(Required)Event type. Must be set to session.finish. |