Add from file
Creates a new pronunciation dictionary from a lexicon .PLS file
Adding a pronunciation dictionary
Here is some example code for uploading a pronunciation dictionary and printing the response pronunciation_dictionary_id and version_id. You’ll require these identifiers in the request body if you intend to use pronunciation_dictionary_locators.
All you will need to do is replace API_KEY_HERE with your actual API key and PATH_HERE with the actual path to the PLS file you want to upload.
If you need help in understanding how to properly format a PLS / pronunciation dictionary, please refer to the guide here.
Using a pronunciation dictionary
Here is some example code on how to use these identifiers or locators in your text-to-speech call.
Headers
Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.
Body
The name of the pronunciation dictionary, used for identification only.
A lexicon .pls file which we will use to initialize the project with.
A description of the pronunciation dictionary, used for identification only.
Should be one of 'editor' or 'viewer'. If not provided, defaults to no access.
admin, editor, viewer Response
Was this page helpful?