Skip to main content
Save pronunciation rules once and reuse them by lexicon_id on any batch request or realtime reply.
A Lexicon object holds pronunciation rules for words such as brand names and acronyms. Pass its lexicon_id when you use batch or open a realtime reply.

The Lexicon Object

Attributes

string
Unique identifier for the lexicon. Starts with lx_.
string
Your name for the lexicon. Up to 100 characters.
string
How every rule’s value is written. Values: ipa, arpa, respell.
array
Up to 100 {"word", "value"} pairs. word is up to 100 characters, value up to 120.
integer
Version of the lexicon.

Example Lexicon Object


Create a Lexicon

Create a lexicon. An organization can have up to 100.

Arguments

string
required
Your name for the lexicon. Up to 100 characters.
string
required
How the values are written. Values: ipa, arpa, respell.
array
required
Up to 100 {"word", "value"} pairs.

Response

Returns the Lexicon object, with the request’s api_id and "message": "created".

Retrieve a Lexicon

Get one lexicon by its ID.

Arguments

No arguments required.

Response

Returns the Lexicon object, with the request’s api_id. Returns 404 not_found if the lexicon doesn’t exist.

List All Lexicons

List every lexicon in your organization.

Arguments

No arguments. Query parameters aren’t accepted: one returns 422 invalid_request naming it.

Response

string
Unique identifier for the request.
object
limit, offset, total_count, next and previous. All lexicons come back in one page.
array

Delete a Lexicon

Permanently delete a lexicon.

Arguments

No arguments required.

Response

Returns 200 on success. Returns 404 not_found if the lexicon doesn’t exist.
Synthesizing with a deleted lexicon_id returns 422 invalid_request with param: lexicon_id.