Tell Baton the language people will speak. It improves quality: turn ends, answers, hints and transcripts are all better when Baton knows the language. If a user may speak one of several, send them as an allowed set: a list is still much better than nothing.
language in session.start is always an object. Codes are BCP-47 style: en, es, ja-JP.
| Policy | Example | Behaviour |
|---|---|---|
| Pin | {"pin": "en"} (default) |
One language for the session. {"pin": "auto"} detects. |
| Allowed set | {"allowed": ["en", "es", "fr"]} |
The first is the starting language. Rooms switch individual voices within the set. |
| Automatic | {"mode": "auto"} |
Detect the language. |
End-of-turn operating points are published for 14 languages: ar, de, en, es, fr, hi, id, it, ja, ko, nl, pt, tr, zh. Other languages use the English points.
Rooms: per-voice language
Each asr.final says which language its words are in. With language in signals, Baton also reports the language it hears each voice speaking:
{
"type": "asr.language",
"seq": 30,
"t": 15.36,
"speaker": "spk_0",
"language": "en",
"confidence": 0.9981
}
When a voice is clearly speaking another language from your allowed set, Baton switches that voice's transcription to it (reported with language in signals):
{
"type": "language.switched",
"seq": 52,
"t": 41.6,
"speaker": "spk_2",
"language": "es"
}
Without an allowed set, Baton does not switch. It sends a warning instead, whatever your signals:
{
"type": "warning",
"code": "language_mismatch",
"t": 41.6,
"speaker": "spk_2",
"language": "es"
}
language.switch_recommended means a voice is speaking a language from your allowed list that this room can't switch its transcript to:
{
"type": "language.switch_recommended",
"seq": 61,
"t": 52.0,
"speaker": "spk_1",
"language": "ja"
}
That voice's transcript keeps coming in the room's current language, so its words may be poor; turns are unaffected. How to act on it:
- The person matters to you (for example, the caller in a one-to-one room): end the session and start a new room with
"language": {"pin": "ja"}, or withjafirst inallowed. - Most of the room now speaks it: start the next room with that language first in
allowed. - A passing remark: ignore it.
language.summaryat the end tells you how much each voice spoke in each language, so you can setlanguagebetter next time.
For English-led meetings that may include other speakers, use an allowed set led by English. Transcription is most accurate when the room starts in the language most people speak.