set_multilingual
set_multilingual
Configure recognizer-driven multilingual mode. The speech recognizer runs in
code-switching mode and the agent answers in whichever language the caller
actually spoke; the model doesn’t pick the language. The SDK emits the object
as the top-level multilingual key of the AI verb.
This is mutually exclusive with set_languages() and
add_language(). If both are set, the platform uses
multilingual and ignores languages.
In multilingual mode, speech recognition hints added with add_hints() or
add_dynamic_hints() are not used, and no error is returned.
Pattern hints from add_pattern_hint() still rewrite what the agent hears.
Parameters
config
The multilingual configuration object, passed through unchanged. See the
SWML multilingual reference for its keys, including
the language list, the starting language, and switching thresholds.
A language’s voice can be one voice or a list of voices, the first speaking and the
rest tried in order when it fails. The SDK doesn’t check these voices: unlike
add_language(), it doesn’t enforce the 8-voice limit or the voice
format. A language with no voice uses the voice from
set_default_voice(), when one is set.
Returns
AgentBase — Returns self for method chaining.