What goes in a list
- One language per list. A list has a BCP 47 language tag, such as
en-US,en-GBorhi-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,Xfinityor a place name likeCoeur 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
ipato 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ɪnfor Coeur d’Alene).
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: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 apronunciation 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:
/v1/metric/policies), name the metric by its id. Look it up from the slug first:
id with the setting:
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 akind: 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 withoutipagets one filled in on apply, as over the API. Read the list back withGET /v1/metric/pronunciation-lists/{listId}to check it. displayNameis the list’s name in Roark and must be unique in your organization; it defaults toname. 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.