Enterprises serving several markets — or diverse populations within one market, like Singapore, Malaysia, or the Philippines — want voice agents that work in the customer's language without asking them to press a button. That requires language identification (LID): detecting which language is being spoken so the agent can recognize it correctly and reply in kind. It sounds straightforward. In a live call, with short replies, noise, and code-switching, it's one of the trickier parts of a multilingual voice agent.
What are the main approaches?
Per-call: identify the language once, at the start, often from the first reply or from customer records. Simple and fast, but wrong whenever the customer switches. Per-utterance: identify the language of each customer turn. More flexible, but each turn needs enough speech to classify reliably. Word- or segment-level: recognize mixed languages within a turn, usually by using a single model that handles several languages jointly. This is what code-switched speech needs. Multilingual models such as Whisper and MMS include language identification, typically at the utterance level.
Why do short replies break language detection?
Because there's too little evidence. "Ok", "yes", "hello", "ya", and many numbers sound similar across languages, and a one- or two-word reply may not contain enough distinctive sounds to classify reliably. Telephone audio and noise make it harder. An agent that switches language based on one short reply will often switch wrongly. Better practice is to require stronger evidence before switching, and to use context — the customer's known preference, the region, the language of previous turns.
How does code-switching affect language identification?
It makes the question "which language?" partly meaningless. A Taglish sentence is both Tagalog and English. Forcing a single label leads to recognition errors on the words in the "other" language. Systems serving code-switching customers should recognize the expected language pair jointly rather than choosing one, and use LID mainly to detect a switch to a different language altogether — say, from Malay to Mandarin. Mid-utterance code-switching covers joint recognition.
What about latency?
Every extra step adds delay. Running several language-specific recognizers in parallel and choosing the best can be accurate but expensive; waiting for enough speech to identify the language adds time before the agent can respond. In practice, systems combine a fast initial guess from context with continuous checking, and only switch when evidence is strong. Response time should be measured per language to make sure LID isn't slowing the agent down. Latency in real-time voice agents covers the full chain.
How should the agent decide which language to reply in?
By following the customer, within limits. If a customer clearly switches to another supported language, the agent should follow. If they mix languages, the agent should reply in a similar mix that matches the brand's voice guidelines. If detection is uncertain, the agent can briefly offer a choice ("Would you prefer English or Bahasa?"). Customer preferences should be remembered for future calls and other channels. Cross-channel language continuity covers that.
How should language identification be tested?
On real calls with labeled language and code-switching, including short replies, noisy audio, and customers who switch mid-call. Measure accuracy at the level the system makes decisions (per call, per turn), the rate of wrong switches, and the impact on recognition accuracy and task completion. Test by market and demographic, since switching patterns vary.
How does WIZ.AI handle language identification?
Language Engine combines joint recognition for common code-switched language pairs with turn-level detection of switches to other supported languages, using context and customer preferences to avoid wrong switches. It runs in Wizlynn and Talkbot, and QM reports language and switching behaviour by segment.
A multilingual agent should follow the customer's language without making them think about it. Book a demo and test it with your customers' mix of languages.
Related insights
Continue the thread
References
- Robust Speech Recognition via Large-Scale Weak Supervision (Whisper) — Radford et al., 2022
- Scaling Speech Technology to 1,000+ Languages (MMS) — Pratap et al., Meta AI, 2023
- The Decades Progress on Code-Switching Research in NLP: A Systematic Survey on Trends and Challenges — Winata et al., 2023
- Code-Switching Recognition for Southeast Asian Customer Conversations — WIZ.AI
- Mid-Utterance Code-Switching in Contact Center ASR — WIZ.AI
Book Demo