Pronunciation Dictionaries

update pronunciation dictionary

Changed on

Updates a pronunciation dictionary's name, entries or both. entries replaces the whole list. The save is live: sessions that start afterwards use the new entries, and running sessions keep the entries they started with.

Without expectedRevision, the update applies to the current revision and the last write wins. With it, the update is rejected with 409 REVISION_CONFLICT if the dictionary has been saved since that revision.

Entries are validated as a whole: if any entry is invalid, nothing is saved and the response lists every error by one-based row.

put/v1/pronunciation-dictionaries/{id}

Request

  • Base URL
    https://api.anam.ai
  • URL
    https://api.anam.ai/v1/pronunciation-dictionaries/{id}
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

Pronunciation dictionary ID

Request body

OR

Example request

{
  "name": "Brand names",
  "entries": [
    {
      "text": "Anam",
      "kind": "sounds_like",
      "pronunciation": "annum",
      "soundsLike": "annum"
    }
  ],
  "expectedRevision": 1
}

Response

Successfully updated pronunciation dictionary

idstring uuid

Pronunciation dictionary ID. Pass it as voiceGenerationOptions.pronunciationDictionaryId when creating a session token.

namestring

Display name

revisioninteger

Starts at 1 and increases with every save. Send it as expectedRevision to reject a write if someone else saved first.

createdAtstring date-time

When the dictionary was created

updatedAtstring date-time

When the dictionary was last saved

Example response

{
  "id": "4f600129-13cf-4bfa-909a-2f4c31467f43",
  "name": "Brand names",
  "revision": 1,
  "entries": [
    {
      "text": "Anam",
      "kind": "sounds_like",
      "pronunciation": "annum",
      "soundsLike": "annum"
    }
  ]
}

Changes