People mix languages
A global voice system cannot assume that an utterance belongs to one language. People mix languages, dialects, registers, borrowed words and names, often inside a single sentence.
“Kabir ko revised invoice kal bhejna, but price mention mat karna.” Send Kabir the revised invoice tomorrow, but don’t mention the price. The grammar is Hindi, several of the words are English, including the conjunction, and the name belongs to neither language. “Dile a Tomás que mande el invoice before Friday” mixes Spanish and English in the same way.
There is no useful point at which infrastructure should demand one language label for the whole utterance. People switch between sentences, inside sentences, inside phrases and around names and products. Code-switching is ordinary speech, and a system should treat it as ordinary.
Four facts that are often stored as one
Language is not script is not locale is not country.
Speech has no script until someone transcribes it. The same Hindi sentence can be written in Devanagari or in Latin letters, and Serbian is routinely written in both Cyrillic and Latin. The standard language tags used on the web keep these apart for good reason: a tag such as hi-Latn names Hindi written in Latin script.
Locale is separate again. Dates, numbers, currency and time zones have to be read from context, never derived from language alone. English cannot tell you whether 3/4 means 3 April or 4 March. An English speaker in Riyadh who says “this weekend” means Friday and Saturday.
Language identification is a signal
An estimate of which language is being spoken can help the models downstream. It should never decide which branch of code runs.
The estimate can change within one turn, and a gate that routes audio to a single-language model breaks the moment the speaker switches. Keep the infrastructure universal and treat language as evidence.
Shared multilingual models bring real gains: transfer between languages, shared sound structure, some ability in languages with little training data. Their quality is still uneven. Universal architecture does not mean universal quality. A tokeniser can represent every script and still perform badly wherever training data was thin.
Sounds that carry meaning
Many languages use sound in ways English does not, and a system tuned on English can erase meaning without noticing.
- Lexical tone, as in Yoruba, Mandarin and Thai, where pitch distinguishes words.
- Vowel length, as in Japanese, where obasan is an aunt and obaasan a grandmother.
- Doubled consonants, as in Italian, where pala is a shovel and palla a ball.
- Clicks in Xhosa and Zulu, and ejectives in Amharic and Georgian.
- Rich word structure, as in Turkish and Finnish, where one word can carry what English spreads across a phrase.
- Writing without spaces between words, as in Thai and Japanese.
A model that treats pitch as noise can delete the difference between two words in a tone language. Pitch carries more than emotion.
Names cross every boundary
Names move between languages, sound systems and scripts, so a spelling is a weak clue to who someone is.
Yusuf may arrive as Yusuf, Youssef or Yousef, in Arabic script or in Latin, and Inés may lose her accent on the way. “Kabir” in speech has to become one specific Kabir among the owner’s contacts. The useful tools are biasing recognition towards the people the owner actually knows, generating transliteration candidates, resolving against real identities, and asking for a spelling when it matters.
Replies follow the person
The language of a reply should follow the person, and the person may change languages halfway through a turn.
A reply can follow the language of the current speech, an explicit preference, the history of the conversation or the audience. A message to someone else may need a different language from the one its owner spoke. No hard-coded language setting should own the conversation.
The same action meets the same rules
Whatever language a request arrives in, the same action must face the same authorisation policy.
“Send it”, “bhej do”, “mándalo”, “envoie-le” and “送って” all ask for the same action. They must meet the same checks, and switching language must never become a way around the boundary between conversation and action.
Critical fields deserve particular care in mixed speech. In the Hindi and English example, the instruction not to mention the price rests on one short word, mat. Lose it and the request turns into its opposite.
Kitaab takes a request in whatever language its owner speaks, mixed or not, and nothing goes out in the owner’s name without their yes to the exact words.
Measure where it breaks
Average accuracy hides the failures that matter. Evaluate at the intersections where real speech lives.
Measure recognition of code-switched speech, names, critical fields such as recipient, amount, date and negation, the accuracy of each extracted detail, and whether confidence matches accuracy. Break results down by noise, device and dialect together, because a benchmark can look healthy while one dialect fails. For languages with little data, multilingual pre-training, self-supervised learning, pseudo-labelling, synthetic speech and community data all help. Models that work directly on audio help too, and they can still blur rare distinctions and inherit the biases of their data.
Language-neutral architecture does not mean language-blind understanding. Represent language as evidence where it helps, keep the infrastructure universal, and keep the meaning of every action the same in every language.
Further reading
The linguistics and standards behind this note.
- Poplack, S. (1980). Sometimes I’ll start a sentence in Spanish y termino en español: toward a typology of code-switching. Linguistics, 18(7–8).
- Gumperz, J. J. (1982). Discourse Strategies. Cambridge University Press.
- Myers-Scotton, C. (1993). Duelling Languages: Grammatical Structure in Codeswitching. Clarendon Press.
- Phillips, A. and Davis, M. (2009). Tags for identifying languages (BCP 47, RFC 5646). Internet Engineering Task Force.
- Joshi, P., Santy, S., Budhiraja, A., Bali, K. and Choudhury, M. (2020). The state and fate of linguistic diversity and inclusion in the NLP world. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.