qwen3.5-livetranslate-flash-realtime is a vision-enhanced real-time translation model supporting 60 languages (29 with audio + text, 31 text-only). It processes audio and image input from video streams or local files, uses visual context to improve accuracy, and outputs translated text and audio in real time.
Try an online demo with one-click deployment using Function Compute .
Features
- Multi-language support: Translates between 60 languages — 29 with audio and text output, 31 with text-only output — including Chinese, English, French, German, Russian, Japanese, Korean, Spanish, Portuguese, and Arabic.
- Visual enhancement: Analyzes visual cues, such as lip movements, gestures, and on-screen text, to improve translation accuracy, especially in noisy environments or for ambiguous words.
- 2.8-second latency: Delivers simultaneous interpretation with latency as low as 2.8 seconds.
- Lossless simultaneous interpretation: Predicts semantic units to resolve cross-language word order differences, achieving quality comparable to offline translation.
- Natural voice: Matches the intonation and emotion of the source audio automatically.
- Hotword configuration: Configurable hotwords improve translation accuracy for specific terms.
- Voice cloning: Clones the speaker's voice for translated output. Supports server-side real-time cloning and pre-cloned voice profiles.
- Skip same-language output: When the source and target languages are the same, the model can skip text output, audio output, or both. This feature takes effect only when the target language is Chinese (
zh) or English (en).
Procedure
1. Configure the connection
The model connects over WebSocket with the following parameters:
In addition to WebSocket, this model also supports the AOQ and WebRTC protocols. For client-side integration that prioritizes stable latency, resilience on weak networks, and built-in full-duplex noise suppression and echo cancellation, AOQ is recommended. For a protocol comparison, see Realtime API overview.
| Parameter | Description |
|---|---|
| endpoint | China (Beijing) region: wss://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api-ws/v1/realtime. Replace {WorkspaceId} with your actual workspace ID.Singapore region: wss://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api-ws/v1/realtime.Replace {WorkspaceId} with your actual workspace ID. |
| query parameter | The model query parameter must be set to the model name. Example: ?model=qwen3.5-livetranslate-flash-realtime |
| message header | Use a Bearer Token for authentication: Authorization: Bearer DASHSCOPE_API_KEYDASHSCOPE_API_KEY is your API key from Model Studio. |
Python sample code for WebSocket connection
Python sample code for WebSocket connection
2. Configure language, modality, and voice
Send the session.update client event with the following parameters:
-
Language
-
Source language: Configure using the
session.input_audio_transcription.languageparameter.If not specified, the model automatically detects the source language.
-
Target language: Configure using the
session.translation.languageparameter.The default value is
en(English).
-
Source language: Configure using the
-
Output source language recognition results
Set
session.input_audio_transcription.modeltoqwen3-asr-flash-realtime. The server then returns both the translation and the speech recognition result (original text) for the input audio. The server returns these events:conversation.item.input_audio_transcription.text: Streams the recognition results.conversation.item.input_audio_transcription.completed: Returns the final result after the recognition is complete.conversation.item.input_audio_transcription.failed: Returns error information when recognition fails.
-
Output modality
Set the
session.modalitiesparameter to["text"](text only) or["text","audio"](text and audio). -
Voice Activity Detection (VAD) and Manual mode
Configure how speech boundaries are detected using the
session.turn_detectionparameter:- VAD mode (default): Set
turn_detectionto a configuration object. The server automatically detects speech boundaries and triggers translation, suitable for scenarios where the client continuously sends audio streams. - Manual mode: Set
turn_detectiontonull. The client determines speech boundaries and sends aninput_audio_buffer.commitevent to submit the audio after each utterance, suitable for push-to-talk scenarios.
- VAD mode (default): Set
-
Voice
Configure using the
session.voiceparameter. See Supported voices. -
Hotword
Configure hotwords using the
session.translation.corpus.phrasesparameter. Hotwords are key-value pairs that map source terms to target translations, improving accuracy for specific terms. Example: Map"artificial intelligence"to"Artificial Intelligence". -
Voice cloning
Configure using the
session.enable_voice_clone,session.voice_clone_options.frequency, andsession.voiceparameters. Supports three modes: pre-cloned voice profile (frequency:never), server-side clone once at session start (once), or real-time clone before each response (always). See Voice cloning.
3. Input audio and images
Send Base64-encoded audio and image data using the input_audio_buffer.append and input_image_buffer.append events. Audio input is required; image input is optional.
Images can be from a local file or captured in real time from a video stream.How the model determines that an utterance is complete depends on the VAD mode or Manual mode configured via the turn_detection parameter:
- VAD mode (default): The client continuously sends input_audio_buffer.append events. When the server detects speech start/end, it returns
input_audio_buffer.speech_startedandinput_audio_buffer.speech_stoppedevents respectively, automatically commits the audio buffer, and triggers translation. Translation responses are generated synchronously with the streaming audio and typically begin during audio input, without waiting for the speech to end. - Manual mode: Set
session.turn_detectiontonull. After the client finishes sending a complete utterance, it sends an input_audio_buffer.commit event to commit the audio buffer. After the server returns aninput_audio_buffer.committedevent to confirm, it automatically starts generating the translation response; the client does not need to send any other event to trigger the response. To clear uncommitted audio before committing, send an input_audio_buffer.clear event.
4. Receive the model response
Translation responses are generated synchronously with the streaming audio and typically do not require waiting for speech to end (see the VAD/Manual mode description in the previous section). The response format depends on the output modality.
- Text-only output The server streams incremental translated text (including confirmed text and tentative predicted text) through response.text.text events; upon completion, the full translated text is returned in a response.text.done event.
-
Text and audio output
- Text The server streams incremental translated text through response.audio_transcript.text events; upon completion, the full translated text is returned in a response.audio_transcript.done event.
- Audio The server returns incremental, Base64-encoded audio data in response.audio.delta events.
5. End the session
After sending all audio, send a Client events event, then wait for the server to return a session.finished event before closing the WebSocket connection.
If you close the WebSocket without sending session.finish, the server's VAD cannot detect the end of the final speech segment. This causes translation results for that segment to be lost entirely, and the connection may hang indefinitely. Always send this event before disconnecting.
Supported models
Recommended models
| Model | Version | Context window | Max input | Max output |
|---|---|---|---|---|
| (tokens) | ||||
qwen3.5-livetranslate-flash-realtimeAlias for qwen3.5-livetranslate-flash-realtime-2026-05-19 | Stable | 53,248 | 49,152 | 4,096 |
| qwen3.5-livetranslate-flash-realtime-2026-05-19 | Snapshot | |||
Legacy models
The following model is still available but is no longer the recommended choice. For new use cases, use the newer model above for better translation quality and cost-efficiency.
| Model | Version | Context window | Max input | Max output |
|---|---|---|---|---|
| (tokens) | ||||
qwen3-livetranslate-flash-realtimeAlias for qwen3-livetranslate-flash-realtime-2025-09-22 | Stable | 53,248 | 49,152 | 4,096 |
| qwen3-livetranslate-flash-realtime-2025-09-22 | Snapshot | |||
Getting started
-
Prepare the environment
Requires Python 3.10 or later.
First, install pyaudio.
Then install the WebSocket dependencies:macOS
-
Create the client
Create a file named
livetranslate_client.pywith the following code:Client code - livetranslate_client.py
-
Interact with the model
In the same directory, create a file named
main.pywith the following code:Runmain.py
main.pyand speak into your microphone. The model translates your speech and outputs audio and text in real time.
Voice cloning
The model clones the speaker's voice from input audio and uses it for translated output. Use a pre-cloned voice profile or let the server clone in real time. Useful for conference interpreting, live streaming, and video dubbing.
Set the following parameters in session.update to enable voice cloning:
-
session.enable_voice_clone: Set totrueto enable voice cloning. -
session.voice_clone_options.frequency: Controls when voice cloning occurs. Accepted values:never: Does not clone on the server. Uses a pre-cloned voice profile instead. Setsession.voiceto your custom cloned voice ID.once: Clones the voice from the input audio once at session start, then reuses it for all subsequent output. Best for single-speaker scenarios. Setsession.voicetodefault.always: Clones the voice before each response, dynamically adapting to speaker changes. Best for multi-speaker conversations. Setsession.voicetodefault.
-
session.voice: Specifies the output voice. The value depends on thefrequencysetting:- Set to
default: Use withfrequencyset toonceoralways. The server clones the speaker's voice from the input audio. A default voice is used until cloning completes. - Set to a custom cloned voice ID (for example,
qwen-translate-vc-xxx-yyy-zzz): Use withfrequencyset tonever. You must prepare the voice in advance using the Voice Cloning API withtargetModelset toqwen3.5-livetranslate-flash-realtime.
- Set to
Whenfrequencyis set toonceoralways, thevoiceparameter must be set todefault. Any other value causes the server to return an error.
Voice cloning configuration examples
Pre-cloned voice profile (consistent quality; recommended when a stable voice identity is required):
Improve translation with images
Image input helps disambiguate homonyms and recognize uncommon proper nouns during translation. Send no more than 2 images per second.
Download the following sample images: medical mask.png, masquerade mask.png
Download the code below to the same directory as livetranslate_client.py and run it. Say "What is mask?" into your microphone. The model uses the image to disambiguate: medical mask.png yields "What is a medical mask?" and masquerade mask.png yields "What is a masquerade mask?".
One-click Function Compute deployment
To deploy the application:
- Open the Function Compute template, enter your API key, and click Create and Deploy Default Environment to test the application.
- Wait for about a minute. In Environment Details > Environment Context, retrieve the endpoint, change the protocol from http to https (for example, https://qwen-livetranslate-flash-realtime-intl.fcv3.xxx.ap-southeast-1.fc.devsapp.net/), and open the URL in a browser to interact with the model.
If you are prompted to configure Resource Access Management permissions, follow the on-screen instructions.
To view the project source code, go to Resource Information > Function Resources .
Both Function Compute and Model Studio provide a free quota for new users, sufficient for basic debugging. After the free quota is used up, pay-as-you-go billing applies.
Interaction flow
Translation uses an event-driven WebSocket model. How speech boundaries are determined depends on VAD mode or Manual mode (see 3. Input audio and images). The table below is based on VAD mode (default) and annotates the different server events in Manual mode.
| Lifecycle | Client event | Server event |
|---|---|---|
| Session initialization | session.updateSession configuration | session.createdSession createdsession.updated Session configuration updated |
| User audio input | input_audio_buffer.appendAppend audio to the bufferinput_image_buffer.append Append image to the bufferinput_audio_buffer.commit (Manual mode only) Commit the audio buffer | VAD mode:input_audio_buffer.speech_startedSpeech start detectedinput_audio_buffer.speech_stopped Speech end detected; server automatically commits the audio bufferManual mode:input_audio_buffer.committed Returned after the client sends input_audio_buffer.commit, confirming the audio buffer has been committed |
| Server audio output | None | response.createdSignals that the server starts generating a response.response.output_item.added Signals that a new output item is available.conversation.item.created A new message item is created in the conversation.response.content_part.added Signals that a new content part has been added to the assistant message.response.text.text Incremental translated text in text-only modalityresponse.audio_transcript.text Incremental translated text in audio+text modalityresponse.audio.delta Contains an incremental chunk of the synthesized audio.response.text.done Translation text complete in text-only modalityresponse.audio_transcript.done Translation text complete in audio+text modalityresponse.audio.done Signals that the synthesized audio is complete.response.content_part.done Signals that a text or audio content part for the assistant message is complete.response.output_item.done Signals that the entire output item for the assistant message is complete.response.done Signals that the entire response is complete. |
| Session termination | session.finishNotifies the server that audio input is complete | session.finishedServer processing complete; session ended |
session.finish event and wait for session.finished before closing the WebSocket. If you close the connection without sending session.finish, the server cannot know that audio input has ended, and the recognition and translation results for the last speech segment will be lost.
API
- Qwen-Livetranslate-Realtime.
- AOQ client SDK
- Realtime API overview (WebRTC protocol description)
Billing
Qwen3.5-LiveTranslate-Flash-Realtime
- Audio: 7 tokens per second of input audio; 12.5 tokens per second of output audio.
- Image: Every 32×32 pixels consumes 0.5 tokens.
- Text: When source language speech recognition is enabled, the service returns a transcript of the input audio in addition to the translation. This transcript is billed as output text tokens.
- Audio: Each second of audio input or output consumes 12.5 tokens.
- Image: Every 28×28 pixels consumes 0.5 tokens.
- Text: When source language speech recognition is enabled, the service returns a transcript of the input audio in addition to the translation. This transcript is billed as output text tokens.
Rate limits
For information about model rate limits, see Rate limiting.
Supported languages
Use the following language codes to specify the source and target languages.
Some target languages only support text. The legacy model qwen3-livetranslate-flash-realtime supports only the following 18 languages: en, zh, ru, fr, de, pt, es, it, id, ko, ja, vi, th, ar, yue, hi, el, tr.
Language code | Language | Output |
|---|---|---|
zh | Chinese | Audio + text |
en | English | Audio + text |
ar | Arabic | Audio + text |
de | German | Audio + text |
fr | French | Audio + text |
es | Spanish | Audio + text |
pt | Portuguese | Audio + text |
id | Indonesian | Audio + text |
it | Italian | Audio + text |
ko | Korean | Audio + text |
ru | Russian | Audio + text |
th | Thai | Audio + text |
vi | Vietnamese | Audio + text |
ja | Japanese | Audio + text |
tr | Turkish | Audio + text |
hi | Hindi | Audio + text |
ms | Malay | Audio + text |
nl | Dutch | Audio + text |
ur | Urdu | Audio + text |
nb | Norwegian Bokmål | Audio + text |
sv | Swedish | Audio + text |
da | Danish | Audio + text |
he | Hebrew | Audio + text |
fi | Finnish | Audio + text |
pl | Polish | Audio + text |
is | Icelandic | Audio + text |
cs | Czech | Audio + text |
fil | Filipino | Audio + text |
fa | Persian | Audio + text |
yue | Cantonese | Text |
el | Greek | Text |
af | Afrikaans | Text |
ast | Asturian | Text |
be | Belarusian | Text |
bg | Bulgarian | Text |
bn | Bengali | Text |
bs | Bosnian | Text |
ca | Catalan | Text |
ceb | Cebuano | Text |
et | Estonian | Text |
gl | Galician | Text |
gu | Gujarati | Text |
hr | Croatian | Text |
hu | Hungarian | Text |
jv | Javanese | Text |
kk | Kazakh | Text |
kn | Kannada | Text |
ky | Kyrgyz | Text |
lv | Latvian | Text |
mk | Macedonian | Text |
ml | Malayalam | Text |
mr | Marathi | Text |
pa | Punjabi | Text |
ro | Romanian | Text |
sk | Slovak | Text |
sl | Slovenian | Text |
sw | Swahili | Text |
tg | Tajik | Text |
az | Azerbaijani | Text |
uk | Ukrainian | Text |
Supported voices
For supported voices and the corresponding voice parameter values, see Voice list.