Code switching
With code switching, the language is detected as the conversation goes: a call that moves from English to Spanish and back is transcribed in the language actually spoken.
{ "model": "solaria-3", "language_config": { "languages": ["en", "es"], "code_switching": true }}- List the languages that may be spoken: detection among a few languages is more reliable than among all of them,
and the model never picks a language outside the list (see Language detection
for the locales a model cannot exclude).
Without
code_switching, the language is detected once, among the ones listed, on the first utterance of three words or more, and kept for the whole session: a French speaker who drops English words in a["en", "fr"]session stays labelled French. - An empty list allows every language of the model.
- Each utterance carries the
languageit was transcribed in;result.transcription.languageslists them all, in order of appearance.
Code switching works with every model, among any of the model’s
supported languages, and with solaria-1 where your cluster serves it
(solaria-1). With an empty list, solaria-1
detects among its 99 languages and Cantonese (yue), a language it can
detect but you cannot list.