Skip to main content
POST
/
api
/
v1
/
pronunciation-dictionaries
Create pronunciation dictionary
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    provider: '<string>',
    name: '<string>',
    rules: [{text: '<string>', alias: '<string>'}]
  })
};

fetch('https://blackbox.dasha.ai/api/v1/pronunciation-dictionaries', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "providerId": "<string>",
  "provider": "<string>",
  "orgId": "<string>",
  "contentHash": "<string>",
  "content": [
    {
      "type": "alias",
      "text": "<string>",
      "alias": "<string>"
    }
  ],
  "name": "<string>",
  "createdTime": "2023-11-07T05:31:56Z",
  "lastUpdatedTime": "2023-11-07T05:31:56Z"
}

Rule Types

Pronunciation dictionaries support two types of rules: Alias Rules (word substitutions):
  • Replace one word with another
  • Example: “CEO” → “Chief Executive Officer”
Phoneme Rules (phonetic pronunciations):
  • Specify exact pronunciation using IPA (International Phonetic Alphabet)
  • Example: “Kubernetes” → “kjˈuːbənˌiːts”
Some providers only support alias rules. Check provider-specific documentation for rule type restrictions.

Body

Dictionary configuration

Configuration for creating a new pronunciation dictionary that controls how specific words and phrases are pronounced during text-to-speech synthesis. Pronunciation dictionaries allow you to customize voice output for technical terms, brand names, acronyms, or any text that needs specific pronunciation.

provider
string
required

TTS provider for this pronunciation dictionary. Supported providers: ElevenLabs, Cartesia. The dictionary can only be used with voices from the same provider.

Minimum string length: 1
name
string
required

Display name for the pronunciation dictionary. Used to identify and organize dictionaries in your account.

Required string length: 1 - 64
rules
object[]
required

Pronunciation rules that define how specific text should be spoken. Each rule specifies a word or phrase to match and how it should be pronounced, either using an alias (alternative text) or phonetic representation.

Base class for pronunciation rules that control how specific text is spoken during TTS synthesis. Rules use polymorphic serialization with a type discriminator to support different pronunciation methods (alias or phonetic).

Response

Pronunciation dictionary created successfully

Pronunciation dictionary information including rules, metadata, and provider details. Contains all data needed to use the dictionary with TTS voices and track changes over time.

providerId
string
required

Unique identifier assigned by the TTS provider. Used to reference this dictionary when configuring voices or making API calls to the provider.

Minimum string length: 1
provider
string
required

TTS provider that hosts this pronunciation dictionary. Supported providers: ElevenLabs, Cartesia. The dictionary can only be used with voices from the same provider.

Minimum string length: 1
orgId
string
required

Organization that owns this pronunciation dictionary. Used for access control and resource management.

Minimum string length: 1
contentHash
string
required

Content hash for tracking dictionary changes. This hash changes whenever rules are added, removed, or modified, allowing you to detect updates without comparing full rule lists.

Minimum string length: 1
content
object[]
required

Pronunciation rules defining how specific words and phrases should be spoken. Each rule specifies text to match and its pronunciation using either alias (alternative text) or phonetic representation.

Base class for pronunciation rules that control how specific text is spoken during TTS synthesis. Rules use polymorphic serialization with a type discriminator to support different pronunciation methods (alias or phonetic).

name
string
required

Display name for the pronunciation dictionary. Used to identify and organize dictionaries in your account.

Minimum string length: 1
createdTime
string<date-time>
required

Timestamp when the pronunciation dictionary was originally created.

lastUpdatedTime
string<date-time>
required

Timestamp when the pronunciation dictionary was last modified. Updates when rules are added, removed, or the name is changed.