Save pronunciation rules once and reuse them by
pronunciation_dictionary_id on any batch request or realtime reply.PronunciationDictionary object holds pronunciation rules for words such as brand names and acronyms. Pass its pronunciation_dictionary_id when you use batch or open a realtime reply. See Custom pronunciation for how rules work.
Lexicons are now pronunciation dictionaries: use
pronunciation_dictionary_id in place of lexicon_id, and the /TTS/PronunciationDictionaries/ routes in place of the /TTS/Lexicons/ routes. A lexicon you created keeps its ID. The inline pronunciations field is no longer accepted: write a phoneme span in the text, or save the rules in a pronunciation dictionary.The Pronunciation Dictionary Object
Attributes
1 when the dictionary is created, and one more at each update. A request takes the latest version.Example Pronunciation Dictionary Object
Create a Pronunciation Dictionary
Create a dictionary. An organization can have up to 100: one more returns400 invalid_request. A create with a name you already use makes another dictionary.
Arguments
Up to 100 rules. A rule outside its form returns
400 invalid_request with param naming it, for example rules.0.Response
Returns the Pronunciation Dictionary object, with the request’sapi_id and "message": "created".
Retrieve a Pronunciation Dictionary
Get one dictionary by its ID.Arguments
No arguments required.Response
Returns the Pronunciation Dictionary object, with the request’sapi_id. Returns 404 not_found if the dictionary doesn’t exist in your organization.
List All Pronunciation Dictionaries
List every dictionary in your organization, ordered by name.Arguments
No arguments. Query parameters aren’t accepted: one returns400 invalid_request naming it.
Response
Update a Pronunciation Dictionary
Change a dictionary’s name, description or rules. Itsversion goes up by one.
Arguments
Send only the fields to change. Each field you send replaces the stored one.Response
Returns the updated Pronunciation Dictionary object, with the request’sapi_id. Returns 404 not_found if the dictionary doesn’t exist in your organization.
Delete a Pronunciation Dictionary
Permanently delete a dictionary.Arguments
No arguments required.Response
Returns200 on success. Returns 404 not_found if the dictionary doesn’t exist in your organization.
Generating speech with a deleted or unknown
pronunciation_dictionary_id returns 404 not_found with param: pronunciation_dictionary_id.