Code-switching is normal speech for bilingual people. For software that expects one language per input, it is a common source of errors.
How it works
Solorio et al. (2014), in the first shared task on code-switched data, define it broadly as a communication act, “spoken or written, where two or more languages are being used interchangeably”. Their task labelled each word of Twitter posts with its language across four pairs: Modern Standard Arabic-Dialectal Arabic, Mandarin-English, Nepali-English and Spanish-English. Seven teams submitted 42 runs. Word-level identification was hardest for MSA versus dialect, because the two are closely related, and easiest for Spanish-English and Nepali-English.
Arabic users switch in several ways at once:
- Dialect and MSA. The MADAR paper notes that in unscripted settings where MSA is expected, such as TV talk shows, speakers repeatedly switch between their dialect and MSA.
- Arabic and English or French. Darwish (2014) observes that many Arabic speakers are bilingual and mix English or French with Arabic inside sentences.
- Scripts. Typed messages can mix Arabic script, Latin script and Arabizi in one line.
A typical Gulf chat message mixes all of these:
عندي meeting بكرة الساعة 3، can we move it?
("I have a meeting tomorrow at 3, can we move it?")
The Arabic words are dialect, “meeting” is English inside an Arabic clause, and the sentence ends in English. A language detector, a tokenizer and a speech model each have to cope with that switch.
Why it matters
- Speech-to-text. A transcription request usually takes one
language. An English product name inside Arabic speech may come out in Arabic script, in Latin script or misheard. Agree a convention and score word error rate against it, or you will count style differences as errors. - Routing and search. A language detector that picks one label per message will mislabel mixed messages, so Arabic intents can land in the English flow.
- LLM prompts. Tell the model the input may mix languages and say which language to answer in. Otherwise it may mirror whatever language came last.
On BroadNet Inference
BroadNet’s docs say to always send language with transcription, ar for Arabic and en for English, and warn that without it Arabic can be transliterated into Latin letters. They do not document a mixed-language setting. For Arabic speech with English words, send language=ar to BroadNet Transcribe Arabic and test on real recordings; the dialect speech recognition article covers building that test set. For mixed text in chat, Qwen3.8 27B is the model BroadNet reports testing on Arabic dialects.