> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # setMultilingual > Configure recognizer-driven multilingual mode, where the agent answers in whatever language the caller speaks. [ref-agentbase]: /docs/server-sdks/reference/typescript/agents/agent-base [set-languages]: /docs/server-sdks/reference/typescript/agents/agent-base/set-languages [swml-ai-multilingual]: /docs/swml/reference/calling/ai/multilingual Configure recognizer-driven multilingual mode. The speech recognizer runs in code-switching mode and the agent answers in whatever language the caller actually spoke, rather than the model choosing a language. The config is emitted as the `multilingual` object on the SWML `ai` verb. > **Note** > > Mutually exclusive with [`setLanguages()`][set-languages]. If both are set, the > platform uses `multilingual` and ignores `languages`. ## **Parameters** **`config`** `Record` — required The multilingual configuration object, passed through as-is: `languages` (required, one entry per language with a `voice`), `allowed`, `start_language`, `min_switch_words`, and fillers. See the SWML [`ai.multilingual`][swml-ai-multilingual] reference for every field. --- ## **Returns** [`AgentBase`][ref-agentbase] -- Returns `this` for method chaining. ## **Example** ```typescript {5-12} import { AgentBase } from '@signalwire/sdk'; const agent = new AgentBase({ name: 'dispatch', route: '/dispatch' }); agent.setMultilingual({ start_language: 'en', allowed: ['en', 'es'], languages: [ { language: 'default', voice: 'elevenlabs.rachel' }, { language: 'es', voice: 'elevenlabs.maria' }, ], }); ``` > Configure recognizer-driven multilingual mode, where the agent answers in whatever language the caller speaks.