***

title: addPronunciation
slug: /reference/typescript/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/typescript/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="rule" type="PronunciationRule" required={true} toc={true}>
  A pronunciation rule object with the following fields:
</ParamField>

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

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

  <ParamField path="rule.ignoreCase" type="boolean" toc={true}>
    Whether to ignore case when matching the `replace` expression.
  </ParamField>
</Indent>

## **Returns**

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

## **Example**

```typescript {5}
import { AgentBase } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'support', route: '/support' });
agent.setPromptText('You are a helpful assistant.');
agent.addPronunciation({ replace: 'SQL', with: 'sequel' });
agent.addPronunciation({ replace: 'SWAIG', with: 'swig', ignoreCase: true });
await agent.serve();
```