***

title: add_pronunciation
slug: /reference/python/agents/agent-base/add-pronunciation
description: Add a pronunciation rule to correct how the AI speaks a specific word or phrase.
max-toc-depth: 3
---------------------

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

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

Add a pronunciation rule that tells the TTS engine how to speak a specific word or
phrase. Useful for brand names, acronyms, and technical terms that are commonly
mispronounced by text-to-speech engines.

## **Parameters**

<ParamField path="replace" type="str" required={true} toc={true}>
  The expression to match in the AI's output text.
</ParamField>

<ParamField path="with_text" type="str" required={true} toc={true}>
  The phonetic spelling or alternative text the TTS engine should speak instead.
</ParamField>

<ParamField path="ignore_case" type="bool" default="False" toc={true}>
  Whether to ignore case when matching the `replace` expression.
</ParamField>

## **Returns**

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

## **Example**

```python {5-6}
from signalwire import AgentBase

agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")
agent.add_pronunciation("SQL", "sequel")
agent.add_pronunciation("SWAIG", "swig", ignore_case=True)
agent.serve()
```