Skip to content

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 29, 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 the most 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

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. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.

Related terms

Pages that use this term