> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Pronunciation Dictionaries

> Create, retrieve, list, update and delete pronunciation dictionaries for Plivo Text-to-Speech.

> [!NOTE]
>
> Save pronunciation rules once and reuse them by `pronunciation_dictionary_id` on any batch request or realtime reply.

A `PronunciationDictionary` object holds pronunciation rules for words such as brand names and acronyms. Pass its `pronunciation_dictionary_id` when you use [batch](https://plivo.com/docs/models/text-to-speech/api/batch.md) or open a [realtime](https://plivo.com/docs/models/text-to-speech/api/realtime.md) reply. See [Custom pronunciation](https://plivo.com/docs/models/text-to-speech/concepts/pronunciation.md) for how rules work.

> [!NOTE]
>
> Lexicons are now pronunciation dictionaries: use `pronunciation_dictionary_id` in place of `lexicon_id`, and the `/TTS/PronunciationDictionaries/` routes in place of the `/TTS/Lexicons/` routes. A lexicon you created keeps its ID. The inline `pronunciations` field is no longer accepted: write a [phoneme span](https://plivo.com/docs/models/text-to-speech/concepts/pronunciation.md#phoneme-spans) in the text, or save the rules in a pronunciation dictionary.

## The Pronunciation Dictionary Object

### Attributes

**pronunciation\_dictionary\_id** `string`

Unique identifier for the dictionary. A new dictionary's ID starts with `pd_`.

**name** `string`

Your name for the dictionary. 1 to 100 characters. Two dictionaries can have the same name.

**description** `string`

Your description. Up to 1,000 characters. Empty when you gave none.

**rules** `array`

Up to 100 rules.

**rule**

**word** `string`

The word to replace. 1 to 100 characters: one or more words, one space apart, of any characters except square brackets and braces, such as `5G`, `AT&T` or `Plivo Inc.`.

**kind** `string`

How `value` is written. Values: `ipa`, `arpa`, `respell`.

**value** `string`

How to say the word. 1 to 120 characters, in the form of its `kind`. See [Pronunciation dictionaries](https://plivo.com/docs/models/text-to-speech/concepts/pronunciation.md#pronunciation-dictionaries).

**case\_sensitive** `boolean`

`false` matches the word in any case. `true` matches it only as written.

**version** `integer`

`1` when the dictionary is created, and one more at each update. A request takes the latest version.

**created\_at** `string`

When the dictionary was created, in UTC.

### Example Pronunciation Dictionary Object

```json theme={null}
{
  "pronunciation_dictionary_id": "pd_2bb70cb1eea545e08c83a98076802c8f",
  "name": "brands",
  "description": "Brand names",
  "rules": [{"word": "Plivo", "kind": "respell", "value": "plee-voh", "case_sensitive": false}],
  "version": 1,
  "created_at": "2026-11-17T09:30:00.000Z"
}
```

A create, an update and a delete each answer after at least 2 seconds. Requests you send after the answer use the change.

***

## Create a Pronunciation Dictionary

Create a dictionary. An organization can have up to 100: one more returns `400 invalid_request`. A create with a name you already use makes another dictionary.

```text theme={null}
POST https://api.plivo.com/v1/Account/{auth_id}/TTS/PronunciationDictionaries/
```

### Arguments

**name** `string` *required*

Your name for the dictionary. 1 to 100 characters.

**description** `string`

Your description. Up to 1,000 characters. Empty when left out.

**rules** `array` *required*

Up to 100 rules. A rule outside its form returns `400 invalid_request` with `param` naming it, for example `rules.0`.

**rule**

**word** `string` *required*

The word to replace. 1 to 100 characters.

**kind** `string` *required*

`ipa`, `arpa` or `respell`.

**value** `string` *required*

How to say the word. 1 to 120 characters.

**case\_sensitive** `boolean` (default: false)

`true` matches the word only as written.

```bash cURL theme={null}
curl -X POST "https://api.plivo.com/v1/Account/<auth_id>/TTS/PronunciationDictionaries/" \
  -u '<auth_id>:<auth_token>' \
  -H "Content-Type: application/json" \
  -d '{"name": "brands", "description": "Brand names", "rules": [{"word": "Plivo", "kind": "respell", "value": "plee-voh"}]}'
```

### Response

Returns the [Pronunciation Dictionary object](#the-pronunciation-dictionary-object), with the request's `api_id` and `"message": "created"`.

```json theme={null}
{
  "api_id": "148d6af0bee98c09",
  "pronunciation_dictionary_id": "pd_2bb70cb1eea545e08c83a98076802c8f",
  "name": "brands",
  "description": "Brand names",
  "rules": [{"word": "Plivo", "kind": "respell", "value": "plee-voh", "case_sensitive": false}],
  "version": 1,
  "created_at": "2026-11-17T09:30:00.000Z",
  "message": "created"
}
```

***

## Retrieve a Pronunciation Dictionary

Get one dictionary by its ID.

```text theme={null}
GET https://api.plivo.com/v1/Account/{auth_id}/TTS/PronunciationDictionaries/{pronunciation_dictionary_id}/
```

### Arguments

No arguments required.

```bash cURL theme={null}
curl "https://api.plivo.com/v1/Account/<auth_id>/TTS/PronunciationDictionaries/<pronunciation_dictionary_id>/" \
  -u '<auth_id>:<auth_token>'
```

### Response

Returns the [Pronunciation Dictionary object](#the-pronunciation-dictionary-object), with the request's `api_id`. Returns `404 not_found` if the dictionary doesn't exist in your organization.

***

## List All Pronunciation Dictionaries

List every dictionary in your organization, ordered by name.

```text theme={null}
GET https://api.plivo.com/v1/Account/{auth_id}/TTS/PronunciationDictionaries/
```

### Arguments

No arguments. Query parameters aren't accepted: one returns `400 invalid_request` naming it.

```bash cURL theme={null}
curl "https://api.plivo.com/v1/Account/<auth_id>/TTS/PronunciationDictionaries/" \
  -u '<auth_id>:<auth_token>'
```

### Response

**api\_id** `string`

Unique identifier for the request.

**meta** `object`

`limit`, `offset`, `total_count`, `next` and `previous`. All dictionaries come back in one page.

**objects** `array`

Your [Pronunciation Dictionary objects](#the-pronunciation-dictionary-object).

```json theme={null}
{
  "api_id": "148d6af0bee98c09",
  "meta": {"limit": 1, "next": null, "offset": 0, "previous": null, "total_count": 1},
  "objects": [
    {
      "pronunciation_dictionary_id": "pd_2bb70cb1eea545e08c83a98076802c8f",
      "name": "brands",
      "description": "Brand names",
      "rules": [{"word": "Plivo", "kind": "respell", "value": "plee-voh", "case_sensitive": false}],
      "version": 1,
      "created_at": "2026-11-17T09:30:00.000Z"
    }
  ]
}
```

***

## Update a Pronunciation Dictionary

Change a dictionary's name, description or rules. Its `version` goes up by one.

```text theme={null}
PATCH https://api.plivo.com/v1/Account/{auth_id}/TTS/PronunciationDictionaries/{pronunciation_dictionary_id}/
```

### Arguments

Send only the fields to change. Each field you send replaces the stored one.

**name** `string`

A new name. 1 to 100 characters.

**description** `string`

A new description. Up to 1,000 characters.

**rules** `array`

A new list of up to 100 rules. It replaces the whole stored list.

```bash cURL theme={null}
curl -X PATCH "https://api.plivo.com/v1/Account/<auth_id>/TTS/PronunciationDictionaries/<pronunciation_dictionary_id>/" \
  -u '<auth_id>:<auth_token>' \
  -H "Content-Type: application/json" \
  -d '{"rules": [{"word": "Plivo", "kind": "ipa", "value": "ˈpliːvoʊ"}]}'
```

### Response

Returns the updated [Pronunciation Dictionary object](#the-pronunciation-dictionary-object), with the request's `api_id`. Returns `404 not_found` if the dictionary doesn't exist in your organization.

```json theme={null}
{
  "api_id": "148d6af0bee98c09",
  "pronunciation_dictionary_id": "pd_2bb70cb1eea545e08c83a98076802c8f",
  "name": "brands",
  "description": "Brand names",
  "rules": [{"word": "Plivo", "kind": "ipa", "value": "ˈpliːvoʊ", "case_sensitive": false}],
  "version": 2,
  "created_at": "2026-11-17T09:30:00.000Z"
}
```

***

## Delete a Pronunciation Dictionary

Permanently delete a dictionary.

```text theme={null}
DELETE https://api.plivo.com/v1/Account/{auth_id}/TTS/PronunciationDictionaries/{pronunciation_dictionary_id}/
```

### Arguments

No arguments required.

```bash cURL theme={null}
curl -X DELETE "https://api.plivo.com/v1/Account/<auth_id>/TTS/PronunciationDictionaries/<pronunciation_dictionary_id>/" \
  -u '<auth_id>:<auth_token>'
```

### Response

Returns `200` on success. Returns `404 not_found` if the dictionary doesn't exist in your organization.

```json theme={null}
{"api_id": "148d6af0bee98c09", "pronunciation_dictionary_id": "pd_2bb70cb1eea545e08c83a98076802c8f", "message": "deleted"}
```

> [!NOTE]
>
> Generating speech with a deleted or unknown `pronunciation_dictionary_id` returns `404 not_found` with `param: pronunciation_dictionary_id`.

## Related

* [Custom pronunciation](https://plivo.com/docs/models/text-to-speech/concepts/pronunciation.md)
