English <> French
English <> Hindi
English <> Mandarin
Quickstart
Code switching is on by default. Open a streaming session with no language parameters and the model code-switches natively across all supported languages.- Python
- Python SDK
- Javascript
- JavaScript SDK
Steering toward known languages
When you know which languages a session will use, pass thelanguage_codes connection parameter to steer the model toward them and improve language accuracy.
- For a known subset, pass the codes you expect (for example,
["en", "es"]). The model still code-switches, but heavily biased to the languages you list. - For a monolingual session, pass a single-element list (for example,
["es"]). - For full multilingual, omit
language_codesto keep native code switching across all supported languages.
language_codes connection parameter when you open the WebSocket.
- Python
- Python SDK
- Javascript
- JavaScript SDK
Supported languages
Universal-3.5 Pro Streaming code-switches across 18 languages.| Language | Code | Language | Code |
|---|---|---|---|
| English | en | Danish | da |
| Spanish | es | Finnish | fi |
| French | fr | Hindi | hi |
| German | de | Vietnamese | vi |
| Italian | it | Arabic | ar |
| Portuguese | pt | Hebrew | he |
| Turkish | tr | Japanese | ja |
| Dutch | nl | Mandarin | zh |
| Swedish | sv | Norwegian | no |
Detecting the spoken language
Set thelanguage_detection connection parameter to true to have each turn report which language was spoken. Turn messages then include language_code and language_confidence (a float between 0 and 1) fields, populated when an utterance is complete or the turn is final.
language_detection only controls reporting and doesn’t change how the model transcribes. It’s available on Universal-3.5 Pro Streaming and Universal-Streaming Multilingual.
- Python
- Python SDK
- Javascript
- JavaScript SDK
Updating languages mid-stream
language_codes can be updated during an active session without reconnecting. This is useful when a voice agent detects the caller’s language, or when a conversation is handed off to a speaker of another language. Send an UpdateConfiguration message with the new values. The change takes effect from the next turn.
- Python
- Python SDK
- Javascript
- JavaScript SDK
Other streaming models
Universal-3.5 Pro Streaming is the only streaming model with native (mid-sentence) code switching. The other streaming models handle languages differently.| Model | Languages | Code switching |
|---|---|---|
| Universal-3.5 Pro Streaming | 18 languages (see above) | Native, mid-sentence |
| Universal-Streaming Multilingual | en, es, de, fr, pt, it | Per turn |
| Universal-Streaming English | en only | No |