Glossary
Code-switching
Code-switching is the habit of moving between two or more languages within a conversation or a single sentence. Speech recognizers built around one language often misread the switched words, so mixed speech is harder to dictate than speech in one language.
Updated October 17, 20266 cited facts, each traced to its source
Also called code-mixing.
Code-switching is the habit of moving between two languages within one conversation, or even within one sentence. A speaker might say "let's meet kal subah at ten" in English and Hindi, or start a sentence in Spanish and finish it in English. Linguists also use code-mixing for the case where words from one language are blended into the grammar of the other. In speech technology, the two terms are used for the same problem.
Code-switching breaks the assumption of one language per recording
Most recognizers choose a language for a stretch of audio and decode it with that language's vocabulary and sound patterns. When the speaker switches in the middle of a sentence, the recognizer either picks the wrong language for the switched words or forces them into the wrong spellings. A 2025 study of code-switching recognition says that spontaneous switching within a sentence causes language confusion, and that accent bias blurs the sound boundaries between languages 1.
Error rates are higher on mixed speech
Researchers measure mixed speech with a mixed error rate. On two conversational code-switching corpora, Whisper's mixed error rate on code-switched utterances was about 39 percent 2. The same study found that recognition significantly altered and reduced the speakers' original code-switching 3. That is, the transcript often loses the mix the speaker actually used. The figure comes from two corpora, so it describes those recordings rather than every speaker.
Shortage of labeled mixed data is part of the problem
Recordings with both languages labeled are scarce. The authors of a 2025 study say that even when each language in a mix is well resourced, the shortage of annotated code-switched audio makes recognition harder 4. A 2025 review found that a small subset of languages receive most of the attention, and that the languages covered by datasets are very unevenly spread 5. Mixes that involve a low-resource language are therefore the hardest to get right.
Why it matters for dictation and typing
Dictation tools usually ask you to choose one language. That works for a single-language sentence, but a switched word may come out as a near-miss spelling, a phonetic guess, or a word from the wrong language. Automatic detection does not solve this by itself. Azure's continuous language identification does not detect a change of language within a sentence, so a Spanish sentence with English words inside it is not detected word by word 6. The practical rule is to dictate each sentence in one language where you can, check the switched words after you dictate, and use a multilingual model if your speech mixes languages often. The spoken language identification entry explains how detection decides which language to use.
Related terms
- Spoken language identification: deciding which language is being spoken.
- Low-resource language: a language with little training data.
- Transliteration: writing a word from one script in another.
- Word error rate: the usual error measure for words in one language.
Guides that cover it
Evidence
Every number on this page, with where it comes from. Open a fact to see the exact words in its source.
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
Related terms
- Dictation Languages, Accents and Voice TranslationThe topic this term belongs to
- AccentAn accent is the way a speaker pronounces a language, shaped by where they grew up, their first language or their community. Accents change pronunciation, not vocabulary, and speech recognition error rates can differ sharply from one accent to another.
- Character error rate (CER)Character error rate (CER) is the number of character insertions, substitutions and deletions needed to turn a recognizer's output into the correct text, divided by the number of characters in the correct text. It is the usual measure where words are not separated by spaces.
- DiacriticsDiacritics are marks added to a letter, such as the acute accent in é, the tilde in ñ or the vowel marks in Arabic, that change how a letter sounds or which word it spells. Speech tools and everyday writers often leave them out, so a dictated word can come out spelled differently from what you meant.
- DialectA dialect is a regional or social variety of a language, with its own vocabulary, grammar and pronunciation. Speech recognition is usually less accurate on dialects than on the standard form, because labeled training data for dialects is often scarcer.
- Input method editor (IME)An input method editor (IME) is software that supports text input for characters that cannot be typed easily on a standard keyboard, such as many East Asian characters. Speech input can also be an input method, and Android allows only one input method to be enabled at a time.
- LocaleA locale is a language combined with a region, and sometimes a script, such as en-GB for English as used in the United Kingdom. Dictation and speech settings use locales because the same language can differ in spelling, punctuation and speech patterns from one region to another.
- Low-resource languageA low-resource language is one with little digital speech and text data for training speech recognition and other language tools. There is no fixed cutoff, and a language can be well resourced for one task and poorly resourced for another.
- Modern Standard Arabic (MSA)Modern Standard Arabic (MSA), also called Fusha, is the standardized form of Arabic used in writing and formal speech, such as news broadcasts and official documents. Speakers use regional dialects in everyday conversation, and speech tools recognize formal Arabic more accurately than dialect speech.
- Non-native speechNon-native speech is speech in a language that is not the speaker's first language, often called L2 speech or foreign-accented speech. Recognizers can transcribe read non-native English well, but they handle hesitations, repetitions and revisions differently, and results depend on the system.
- PinyinPinyin, also called Hanyu Pinyin, is the system that spells Mandarin Chinese syllables with the Latin alphabet and marks the tones with diacritics. People type Chinese by spelling the sound in Pinyin and choosing the character they want, and speech tools must choose among characters that share one Pinyin spelling.
- Right-to-left (RTL) scriptA right-to-left (RTL) script is a writing system, such as Arabic, Hebrew, Persian or Urdu, whose letters run from right to left. Text that mixes these letters with digits or Latin words is bidirectional, so software needs a specific algorithm to order and display it.
- Speech translationSpeech translation converts speech in one language into the same meaning in another language, as text or as synthesized speech. Most systems first recognize the speech and then translate the text, so a recognition error carries into the translation.
Pages that use this term
- Dictation Languages, Accents and Voice TranslationTopic
- Hindi Voice Typing and Speech to TextGuide
- Speech Recognition and Accents: Accuracy and FixesGuide
- Multilingual Dictation: Two Languages, Auto-Detect, MixingGuide
- Apple Dictation Languages on Mac: The Full ListGuide
- Whisper Supported Languages and Accuracy by LanguageGuide
- Arabic Speech to Text and Right-to-Left DictationGuide
- Transcribe and Translate Audio in Other LanguagesGuide
- Can speech to text handle Hinglish, Spanglish and other mixed languages?Question
- Can you dictate in two languages at the same time?Question
- Can you translate Zulu or Xhosa audio to English?Question
- Does speech to text understand Arabic dialects?Question
- How do you do voice typing in Hindi on Android?Question
- How do you talk to text in Spanish and get English?Question
- How do you transcribe Arabic or Hebrew audio to text?Question
- How do you transcribe Hindi or Hinglish audio to text?Question
- How do you transcribe Tamil, Urdu, Bengali or other South Asian audio?Question
- How do you translate a voice recording into English text?Question
- How do you translate an audio file into another language?Question
- How do you voice type in Arabic?Question
- Is speech to text as accurate in Spanish as in English?Question
- Which Spanish should you choose for dictation?Question
- Why does Whisper transcribe in the wrong language?Question
- Low-resource languageGlossary