Skip to main content
A pronunciation list holds the words the 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:
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.
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 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:
On a collector (/v1/metric/policies), name the metric by its id. Look it up from the slug first:
Then send that id with the setting:
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.
  • 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.