Code-switching

Code-switching is the practice of moving between languages, dialects, or language varieties within a conversation, a speaking turn, or even a single sentence. For a voice agent, handling it means recognizing the change while preserving the caller's intent and the context already established.

How code-switching works in a voice conversation

A caller may begin in one language, insert a product name or familiar phrase from another, and then continue in the original language. Another caller may change languages completely after learning that an agent supports both. These cases are different from a one-time language selection at the start of a call.

A capable system must distinguish a meaningful language change from a borrowed word, a proper name, or a recognition error. It then needs to transcribe the utterance correctly, retain entities such as names and appointment times, and answer in an appropriate configured language. If the system changes too eagerly, it can produce an awkward or confusing reply. If it reacts too slowly, it may misunderstand the request.

Code-switching also affects voice selection. The voice used for the reply must support the active language set and pronounce words from each language clearly enough for the use case. Teams should test mixed-language scenarios that reflect real caller behavior, including mid-sentence changes, short borrowed phrases, and a return to the original language.

Why it matters for AI phone calls

Forcing callers through a language menu can add friction, especially when a household or workplace naturally uses more than one language. Automatic switching can make the exchange more direct, but only when the agent's prompt, knowledge, and escalation rules work across the configured languages. A multilingual greeting alone does not demonstrate reliable code-switching.

In practice on ThunderPhone

ThunderPhone supports 47 voice languages and 123 voices. An agent starts in its primary language and can switch automatically when a caller uses a configured additional language. The selected voice must support the configured language set; premium language or voice paths add 3¢ per minute.

Related terms