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

# setPronunciations

> Replace the agent's pronunciation rules in a single call.

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

[ref-add-pronunciation]: /docs/server-sdks/reference/typescript/agents/agent-base/add-pronunciation

Replace every pronunciation rule on the agent with the provided array. Use
[`addPronunciation()`][ref-add-pronunciation] to append a single rule without
replacing the list.

## **Parameters**

<ParamField path="rules" type="PronunciationRule[]" required={true} toc={true}>
  Ordered list of pronunciation rules. Each rule has `replace` (the spelled-out
  token), `with` (the phonetic replacement), and an optional
  `ignoreCase` boolean.
</ParamField>

## **Returns**

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

## **Example**

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

const agent = new AgentBase({ name: 'support', route: '/support' });
agent.setPromptText('You are a helpful assistant.');
agent.setPronunciations([
  { replace: 'SignalWire', with: 'signal wire' },
  { replace: 'SWML', with: 'swim el' },
  { replace: 'SWAIG', with: 'swayg' },
]);
await agent.serve();
```