Skip to main content
Transcribe live audio in any supported language, or several at once, with native code switching. Streaming is multilingual by default. It follows speakers as they shift mid-sentence between languages like English and Spanish, French, Hindi or Mandarin, preserving exactly what was said without translating everything into a single language. No configuration is required. Hear what code switching sounds like, and how it’s transcribed.
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.

Steering toward a known language

language_codes steers the model toward the languages you list. It is a bias, not a filter: the model still knows every supported language, and the codes tell it which ones to expect.
  • One language: when you know the session is in one language, pass it as a single-element list (for example, ["es"]). This is the most reliable setting.
  • More than one possible language: omit language_codes. The model detects the language and code-switches natively, including between languages within a sentence.
Listing several languages can produce the wrong oneWith more than one code, speech in one listed language can come out in another, sometimes translated. Accented speech is the most affected: English spoken with a Dutch accent, for example, can be transcribed in Dutch when language_codes is ["en", "nl"]. If a session could be in any of several languages, omit language_codes instead of listing them.
Set the language_codes connection parameter when you open the WebSocket.
Describing languages in a contextual promptYou can also name the expected languages in natural language as part of a contextual prompt (for example, Multilingual conversation in English, Spanish, and German.), but language_codes is the best-supported way to select languages.If the transcript still slips into a closely related language with language_codes set, such as Estonian into Finnish, also add a line naming the language to your prompt (for example, Conversation in Estonian.). See Prompting and keyterms.

Supported languages

All streaming models code-switch across 32 languages.

Detecting the spoken language

Set the language_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.

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.
See Updating configuration mid-stream for the full list of parameters you can update mid-stream.

Looking for pre-recorded code switching?

This guide covers code switching for streaming (real-time audio). If you’re working with pre-recorded audio, see Code Switching (Pre-recorded).