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

# Pronunciation lists

> Manage the words pronunciation metrics check, over the API and in config as code

A pronunciation list holds the words the [Pronunciation Analysis](https://docs.roark.ai/documentation/metrics/system-metrics.md#pronunciation-analysis) metrics check the agent says the way they should sound: brand names, product names, people and places. You point a pronunciation metric at a list on a collector or a run plan, and every call it scores is checked against that list.

Lists belong to your organization, so every project in it can use the same list. Roark also provides a few read-only lists you can use as they are.

## What goes in a list

* **One language per list.** A list has a BCP 47 language tag, such as `en-US`, `en-GB` or `hi-IN`, and it is fixed once the list exists. Make a separate list for each language or accent you test.
* **One word or phrase per entry**, spelled the way it appears in the transcript, such as `Roark`, `Xfinity` or a place name like `Coeur d'Alene`. A phrase is checked as a whole, from its first word to its last, and straight and curly apostrophes count as the same. An entry is listed once per list; case does not matter.
* **IPA is optional.** Give `ipa` to say exactly how the word should sound, in the International Phonetic Alphabet, without slashes (`ɹɔːɹk`, not `/ɹɔːɹk/`). For a phrase, give the IPA of every word, with a space between words (`kɔːɹ dəˈleɪn` for Coeur d'Alene).

A word is only scored once it has IPA. When you send a word without `ipa`, Roark fills it in: with the IPA the same word already has in the list, or else with a suggestion made for the list's language. The response returns the IPA that was stored, so check it and send your own `ipa` for any word that came back wrong. A list holds up to 500 words.

## Over the API

Create a list with its words:

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
curl -X POST https://api.roark.ai/v1/metric/pronunciation-lists \
  -H "Authorization: Bearer $ROARK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Brand names",
    "language": "en-US",
    "entries": [
      { "word": "Roark", "ipa": "ɹɔːɹk" },
      { "word": "Xfinity" }
    ]
  }'
```

```json theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
{
  "data": {
    "id": "6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
    "name": "Brand names",
    "language": "en-US",
    "description": null,
    "source": "CUSTOM",
    "entryCount": 2,
    "configManaged": false,
    "entries": [
      { "word": "Roark", "ipa": "ɹɔːɹk" },
      { "word": "Xfinity", "ipa": "ˈɛksfɪnɪti" }
    ],
    "createdAt": "2026-12-01T10:00:00.000Z",
    "updatedAt": "2026-12-01T10:00:00.000Z"
  }
}
```

Change the words by sending the whole list to `PUT /v1/metric/pronunciation-lists/{listId}/entries`. It replaces every word at once, so a word you leave out is removed, and a word you send again without `ipa` keeps the IPA it has.

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
curl -X PUT https://api.roark.ai/v1/metric/pronunciation-lists/6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f/entries \
  -H "Authorization: Bearer $ROARK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "entries": [{ "word": "Roark" }, { "word": "Xfinity" }, { "word": "Comcast", "ipa": "ˈkɑmkæst" }] }'
```

| Method | Path | SDK method | CLI | What it does |
| - | - | - | - | - |
| `GET` | `/v1/metric/pronunciation-lists` | `metric.listPronunciationLists` | `roark metric pronunciation-list list` | Your organization's lists and Roark's, newest first, without their words. Filter with `language` and `searchText` (name or description). |
| `GET` | `/v1/metric/pronunciation-lists/{listId}` | `metric.getPronunciationList` | `roark metric pronunciation-list get` | One list with its words. |
| `POST` | `/v1/metric/pronunciation-lists` | `metric.createPronunciationList` | `roark metric pronunciation-list create` | Creates a list, optionally with its words. |
| `PUT` | `/v1/metric/pronunciation-lists/{listId}` | `metric.updatePronunciationList` | `roark metric pronunciation-list update` | Renames a list or changes its description. Fields you leave out stay as they are. |
| `PUT` | `/v1/metric/pronunciation-lists/{listId}/entries` | `metric.replacePronunciationListEntries` | `roark metric pronunciation-list entries replace` | Replaces every word in a list. |
| `DELETE` | `/v1/metric/pronunciation-lists/{listId}` | `metric.deletePronunciationList` | `roark metric pronunciation-list delete` | Deletes a list. |

The list pages like the rest of the API: pass `limit` (up to 50) and, for the next page, `after` set to the `nextCursor` of the page before.

The routes need the key's metric permissions (`metric:read`, `metric:create`, `metric:update`, `metric:delete`). Lists belong to the organization, so changing one changes scoring for every project that uses it. Roark's own lists (`source: SYSTEM`) can be read and used, but changing or deleting one fails with `403 forbidden`. A list managed by config as code shows `configManaged: true`, and changing or deleting it over the API fails with `409 resource_in_use`: change it in the config instead. Deleting a list that a collector, run plan or flow still scores against fails with `409 resource_in_use`, naming what uses it: point those metrics at another list first. A run that is still in progress keeps the list it started with, so the delete waits for it to finish too.

If Roark can't suggest IPA for a word, the write fails with a `400` naming the word. Send `ipa` for it yourself.

### Point a metric at a list

Give the pronunciation metric a `pronunciation` setting with the list's id and, optionally, a strictness: `STRICT`, `NORMAL` (the default) or `LENIENT`. A [collector](https://docs.roark.ai/documentation/metrics/metric-collectors.md) and a run plan name the metric differently.

On a **run plan** (`/v1/simulation/plan`, and an inline plan on `/v1/simulation/run`), name the metric by its slug:

```json theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
{
  "metrics": [
    {
      "slug": "pronunciation_correctness",
      "minPassRate": 90,
      "settings": { "pronunciation": { "listId": "6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f", "strictness": "NORMAL" } }
    }
  ]
}
```

On a **collector** (`/v1/metric/policies`), name the metric by its id. Look it up from the slug first:

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
curl https://api.roark.ai/v1/metric/definitions/pronunciation_correctness \
  -H "Authorization: Bearer $ROARK_API_KEY"
# { "data": { "id": "2b7e4c1a-9d3f-4e8a-b6c5-1f0a2d3e4c5b", "metricId": "pronunciation_correctness", ... } }
```

Then send that `id` with the setting:

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
curl -X POST https://api.roark.ai/v1/metric/policies \
  -H "Authorization: Bearer $ROARK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Brand pronunciation",
    "modality": "call",
    "metrics": [
      {
        "id": "2b7e4c1a-9d3f-4e8a-b6c5-1f0a2d3e4c5b",
        "settings": { "pronunciation": { "listId": "6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f", "strictness": "NORMAL" } }
      }
    ]
  }'
```

Run plans grade simulated calls and collectors grade your production calls, so set the list on whichever one runs the calls you want checked. A pronunciation metric needs a list: a collector refuses one without it.

A pass/fail check such as `pronunciation_correctness_check` is scored from its source metric, so it takes no list of its own: set `pronunciation` on `pronunciation_correctness` and add the check without settings. A list sent on the check is refused with a `400` that names the metric it belongs on.

## In config as code

Declare a list as a `kind: pronunciationList` file, and name it from a collector or a simulation plan metric with `pronunciation.list`. The list can also be one made in the app, or one of Roark's, named by its exact name.

```yaml theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
# yaml-language-server: $schema=https://roark.ai/roark-config.schema.json
kind: pronunciationList
name: brand-names
displayName: Brand names
language: en-US
entries:
  - Xfinity
  - word: Roark
    ipa: ɹɔːɹk
```

```yaml theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
kind: simulationPlan
name: brand-pronunciation
# ...plan fields...
metrics:
  - metric: pronunciation_correctness
    minPassRate: 90
    pronunciation:
      list: brand-names
      strictness: NORMAL
```

* An entry is a word, or `{ word, ipa }`. A word without `ipa` gets one filled in on apply, as over the API. Read the list back with `GET /v1/metric/pronunciation-lists/{listId}` to check it.
* `displayName` is the list's name in Roark and must be unique in your organization; it defaults to `name`. Set it to the exact name of a list you made in the app to bring that list under config.
* The project that applies a list manages it, and the list can't be changed over the API or in the app while it does. Other projects in the organization can still name it from their own collectors and plans.
* Removing the file deletes the list on the next apply, unless a metric still scores against it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.