Sonex Labs

How to test a multilingual voice agent before launch

A voice agent that speaks several languages is really several agents sharing one prompt, and a change that fixes one language often breaks another in a way nobody on the team can hear. The reliable way to test it is one language at a time against the same matrix: greetings, numbers, dates, names, yes and no, language switching, interruptions and the disclosure line. Run that matrix on a real phone line with native speakers before launch, and re-run it after every prompt or model change.

Testing multilingual agents: How to test a multilingual voice agent before launch
Written by
Anmol Agarwal
Published
Last updated
Reading time
9 min read
On this page
  1. Why each language needs its own tests
  2. A test matrix for every language
  3. Testing language switching, and why phone lines make it harder
  4. Replaying real moments from calls
  5. Native speakers, real phone lines and consent scripts
  6. After launch: watch each language separately
  7. Sources

Why each language needs its own tests

Each language fails in its own way. Hindi may read a date wrongly while Spanish handles it fine; Arabic may mishear a one-word "yes" that English never gets wrong. Translating an English test script does not cover this, because the hard cases differ by language: number formats, polite forms, names and the words people mix in from English.

The problem is mostly one of effort. A builder running a support bot in English, Spanish and French asked on Reddit how others automate this, because testing every language by hand after each update was exhausting (r/aiagents thread). The two useful replies described the two approaches that work. One team flagged low-confidence transcript segments, accents and long silences for a person to review. Another ran the same test flows in every language and checked where the Spanish or French behaviour drifted from the English.

The plan below combines both: a fixed matrix for every language, specific tests for switching between languages, a replay harness for the model's decisions, and a final round with native speakers on real phone lines. The chart shows the order; each step has its own section.

Six-step flowchart showing how to test a multilingual voice agent before launch across languages
The order in which to test a multilingual voice agent before launch, from a shared test matrix to per-language monitoring.

A test matrix for every language

The matrix is the same in every language, and only the test lines change. Each row targets a known weak point of voice agents. Numbers, dates and short answers are where most errors are found, because they are short, ambiguous and expensive to get wrong.

Write the lines in the register your callers actually use, and have a native speaker write them rather than translating from English. The same applies to the agent's own spoken lines. Keep one prompt for behaviour, such as which tools to call and when to transfer, but write what the agent says natively per language, because translated prompts tend to produce translated-sounding speech.

For each row, write five to ten lines per language and an expected outcome for each: the slot the agent should book, the digits it should read back, the language it should answer in. An expected outcome turns a vague listening session into a pass or fail you can track from one release to the next.

Decide what "right" means before you test

Some expected outcomes are choices, not facts. On our Telugu clinic agents, for example, a clock time can be spoken in English words or in Telugu; both work, and the choice is set per agent. A test that fails every English-word time on a Telugu call would be testing the wrong thing.

Write the choice down per agent and per language, then test against it. The failure is the agent doing something other than what you set, such as switching between the two within one call.

Test matrix for a multilingual voice agent, applied to every language
ItemWhat to testTypical failure
GreetingOpening line, caller replies with their own greeting or a questionStiff, textbook register; talks over the caller's reply
NumbersPhone numbers, amounts, order IDs, said in digits and in wordsDigits dropped or reordered; amounts read in the wrong format
Dates and times"Tomorrow evening", weekdays, local date order, 12- and 24-hour timesOff by a day; time read in words the agent was not set to use
NamesLocal first names and surnames, street and area namesMangled names; the agent spells back something else
Yes and noOne-word answers, regional forms, "hmm" and "okay"A short "yes" not heard, or heard in the wrong language
Language switchingCaller switches mid-call, and mixes words in one sentenceReply in the wrong language; caller cut off at the switch
InterruptionsCaller cuts in, coughs, or says "hmm" while the agent talksAgent keeps talking, or stops for every small sound
DisclosureAI and recording notice, opt-out word in that languageNotice in the wrong language; opt-out word not recognised
Test line, rendered by Pāṇini: a Spanish rescheduling request with a weekday and a time

Quiero cambiar mi cita para el martes a las tres y media, ¿se puede?

Test line, rendered by Pāṇini: a Hinglish request with "tomorrow" and a half-hour time

कल शाम साढ़े पाँच बजे का slot मिल जाएगा?

Test line, rendered by Pāṇini: a two-word Gulf Arabic yes, read by an MSA voice

إيه، تمام.

Testing language switching, and why phone lines make it harder

Language switching needs its own tests, because it fails in the gaps between components rather than inside any one of them. Speech-to-text can hear the right language while the language model replies in another, or the model can reply in a language the voice cannot speak. Three gaps account for most of the failures.

Detection

Some platforms fix the language for a session, or detect it only on text. Google's Dialogflow CX documentation, for example, sets the language per request through a languageCode field, and says its automatic language detection is "available for chat conversations only" (Dialogflow CX multilingual agents). On a phone line, that leaves you to detect the caller's language and pass it on yourself, the bottleneck a Stack Overflow question on Dialogflow CX telephony raises in its title.

Timing at the switch

Builders report that bilingual callers pause at the point where they switch, and that an endpointer tuned for one language takes that pause as the end of the turn (r/AI_Agents thread). One recommended tracking the cut-off rate, the share of turns where the agent started talking before the caller had finished, because a cut-off never shows up in a transcript.

Another said a one- or two-second delay while the system detected a new language felt like a pause to callers (r/GenAI4all thread). Interruptions behave differently by language too; our guide to backchannels such as "haan" and "hmm" in Hindi voice bots shows how a rule tuned for one language misfires in another.

Short replies

Detection on a single word like "sí" or "okay" is unreliable, so test that one short word does not flip the language of the whole conversation. Our article on speech-to-text picking the wrong language on short clips explains why one-word clips are hard.

Valmiki, the Sonex Labs speech-to-text model, detects the spoken language automatically, including a switch inside a sentence, but you should still test short replies in every language you support. The Valmiki speech-to-text API is what the script below calls.

A round-trip smoke test for the speech layer

The script renders test lines with Pāṇini at 8 kHz, the sample rate of a phone call, sends each through Valmiki and checks that the words that matter come back. It catches gross problems, such as a language that is not recognised at all.

Synthesised speech is cleaner than any real caller, so a round trip complements tests with people rather than replacing them. Treat a pass as "not obviously broken", not as proof the language works.

import os
import requests

API = "https://api.sonexlabs.com/v1"
AUTH = {"Authorization": f"Bearer {os.environ['SONEX_API_KEY']}"}

# (label, what the caller says, groups of words; each group needs one match)
CASES = [
    ("es", "Quiero cambiar mi cita para el martes a las tres y media.",
     [["martes"], ["tres", "3"]]),
    ("hi", "कल शाम साढ़े पाँच बजे का slot मिल जाएगा?",
     [["कल"], ["पाँच", "5"]]),
    ("ar", "إيه، تمام، باكر الساعة أربع العصر.",
     [["باكر"], ["أربع", "4"]]),
    ("en", "My number is nine eight four, double one, two zero.",
     [["nine", "9"], ["double", "11"]]),
]

session = requests.Session()
for label, text, groups in CASES:
    speech = session.post(f"{API}/speech", headers=AUTH, json={
        "text": text, "output_format": "wav", "sample_rate": 8000,
    }, timeout=60)
    speech.raise_for_status()

    result = session.post(f"{API}/transcribe",
                          headers={**AUTH, "Content-Type": "audio/wav"},
                          data=speech.content, timeout=60)
    result.raise_for_status()
    heard = result.json()["text"]

    missing = [g for g in groups if not any(w.lower() in heard.lower() for w in g)]
    status = "PASS" if not missing else f"FAIL, missing {missing}"
    print(f"{label}: {status} | heard: {heard}")
Round-trip smoke test: synthesise each test line at 8 kHz with Pāṇini, transcribe it with Valmiki and check key words. A sketch that has not been run end to end; set SONEX_API_KEY and run it once before relying on it.

Replaying real moments from calls

The language model's decisions are best tested by replaying real moments from calls rather than by making new calls. At Sonex we pick moments from test calls where the agent had to decide something: offer a slot, read back a date, transfer the caller, answer in the caller's language. We freeze the conversation up to that point, send it to the model as it was, and grade the reply against what should have happened, such as the right tool called with the right date.

Two things make this work. First, run each moment many times, because the same prompt can pass on one run and fail on the next, and a handful of runs is too few to tell two prompts apart. Second, keep every moment as a regression test, so a prompt change that fixes Telugu dates is checked against Spanish times and Arabic yes-or-no answers before it ships. We also generate scenarios with their own data, such as a calendar per scenario, and grade each reply against that scenario's calendar.

The harness must send what live calls send

A replay harness that differs from production tests a different conversation, and we learned three lessons about this the hard way. A tool result that reaches the model in a different message format from the one in your test can change the answer completely, which our guide to voice agents that ignore their tool result describes in detail.

JSON encoded with ASCII escaping turns Telugu or Arabic text into \u escape codes, which a model can misread as a different word or date. And a sample date written into an instruction gets copied into real replies, and can make a test pass because it happens to match the expected answer.

Settings belong in the same check. A harness that hard-codes its own output cap or temperature can fail, or pass, for reasons callers never see, as our article on empty replies from reasoning models shows.

After launch: watch each language separately

Launch one language at a time if you can, and keep watching per language after launch. Compare completed tasks, transfers to a person, hang-ups in the first ten seconds, cut-offs where the agent spoke before the caller finished, and repeated questions. A language whose numbers drift away from the others is usually the one with a problem nobody on the team can hear.

One phone number with language detection is usually simpler for callers than one number per language, and it leaves one agent to maintain. Separate numbers make sense when languages need different staff, hours or regulations, or when you advertise a dedicated line to one community. Our guide to a bilingual English and Spanish AI receptionist works through that choice for one pair.

If you are building on Sonex, AI voice agents record every call with its transcript, which is the raw material for the per-language comparison and for the next round of replay tests.

Sources

  1. Reddit r/aiagents: Automating multilingual voice agent QA, how are you doing it? (November 2025)Secondary
  2. Reddit r/AI_Agents: multilingual AI voice agent that handles language switching mid conversation (March 2026)Secondary
  3. Reddit r/GenAI4all: English-Spanish voice agents are harder than any TTS demo makes them look (July 2026)Secondary
  4. Reddit r/VocalSynthesis: handling consent in multilingual voice agents (November 2025)Secondary
  5. Stack Overflow: Dialogflow CX telephony language switching bottleneckSecondary
  6. Google Cloud: Dialogflow CX multilingual agentsOfficial

Change log: 24 Oct 2026, Rewritten as one continuous guide: language switching split into detection, timing and short replies; added a part on deciding expected outcomes first (Telugu clock times in English or Telugu, set per agent) and a closing section on per-language monitoring; the steps, checklist, takeaways and FAQs were folded into the body

Questions about your calling setup?

Tell us what you call about, where and in which languages.