Pronunciation Dictionaries

create pronunciation dictionary

Changed on

Creates a pronunciation dictionary. Select it for a session with voiceGenerationOptions.pronunciationDictionaryId.

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

post/v1/pronunciation-dictionaries

Request

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

Request body

namestring required

Display name. Names don't have to be unique; leading and trailing spaces are removed.

Example request

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

Response

Successfully created 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