***

title: add_language
slug: /reference/python/agents/agent-base/add-language
description: Add a language configuration with voice settings for multilingual conversations.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[ai-languages]: /docs/swml/reference/ai/languages

[swml-languages-reference]: /docs/swml/reference/ai/languages

[ref-agentbase]: /docs/server-sdks/reference/python/agents/agent-base

Add a language configuration with voice settings. The agent uses these configurations
to support multilingual conversations with appropriate TTS voices.

<Info>
  Language configurations map to the SWML [`ai.languages`][ai-languages] array.
  See the [SWML languages reference][swml-languages-reference] for the full specification.
</Info>

<Tip>
  The `voice` parameter supports three formats: a simple voice name, an explicit
  engine/model via separate parameters, or a combined `"engine.voice:model"` string.
</Tip>

## **Parameters**

<ParamField path="name" type="str" required={true} toc={true}>
  Human-readable language name (e.g., `"English"`, `"French"`, `"Spanish"`).
</ParamField>

<ParamField path="code" type="str" required={true} toc={true}>
  Language code (e.g., `"en-US"`, `"fr-FR"`, `"es-MX"`).
</ParamField>

<ParamField path="voice" type="str" required={true} toc={true}>
  TTS voice identifier. Accepts one of three formats:

  * Simple name: `"en-US-Neural2-F"`
  * Combined format: `"elevenlabs.josh:eleven_turbo_v2_5"`
  * Short name with explicit `engine`/`model`: `"josh"`
</ParamField>

<ParamField path="speech_fillers" type="Optional[list[str]]" toc={true}>
  Filler phrases used during natural speech pauses (e.g., `["Um...", "Let me see..."]`).
</ParamField>

<ParamField path="function_fillers" type="Optional[list[str]]" toc={true}>
  Filler phrases spoken while executing SWAIG functions
  (e.g., `["One moment please...", "Looking that up..."]`).
</ParamField>

<ParamField path="engine" type="Optional[str]" toc={true}>
  Explicit TTS engine name (e.g., `"elevenlabs"`, `"rime"`). Overrides the
  combined string format if provided.
</ParamField>

<ParamField path="model" type="Optional[str]" toc={true}>
  Explicit TTS model name (e.g., `"eleven_turbo_v2_5"`, `"arcana"`). Overrides the
  combined string format if provided.
</ParamField>

## **Returns**

[`AgentBase`][ref-agentbase] -- Returns self for method chaining.

## **Examples**

### Simple voice

```python {5}
from signalwire import AgentBase

agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")
agent.add_language("English", "en-US", "rime.spore")
agent.serve()
```

### Explicit engine and model

```python {5}
from signalwire import AgentBase

agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")
agent.add_language(
    "English", "en-US", "josh",
    engine="elevenlabs",
    model="eleven_turbo_v2_5"
)
agent.serve()
```

### With fillers

```python {5}
from signalwire import AgentBase

agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")
agent.add_language(
    "English", "en-US", "rime.spore",
    speech_fillers=["Um...", "Let me think..."],
    function_fillers=["One moment please...", "Looking that up..."]
)
agent.serve()
```