Skip to main content

Glossaries

Glossaries are used to specify pronunciations that may differ from the model's default pronunciation of a given term. This can be particularly useful when dealing with unique names, acronyms or words borrowed from other languages.

Note: Glossaries are not shared between the Revoiceit platform and the Revoiceit API.

Create Glossary

Creates an empty glossary with the given name and description. The glossary will be identified by the returned id attribute, which can be passed as a parameter to inference requests.

The glossary can be populated using the Add Glossary Term request.

Method: POST

Endpoint: https://api.revoiceit.com/glossary

Request:

{
"name": string,
"description": string
}

Request Fields:

FieldTypeDescriptionRequired
namestringThe name of the glossary.Required
descriptionstringA brief description of the glossary and its purpose.Optional

Response:

{
"id": string,
"name": string,
"description": string,
"createdAt": ISOString,
"updatedAt": ISOString
}

Returned HTTP Codes

Http CodeDescription
201Glossary created successfully
400Invalid input
500Internal server error

Get Glossaries

Returns a list of glossaries that have been created in the workspace associated with the client credentials provided.

Method: GET

Endpoint: https://api.revoiceit.com/glossary

Response:

[
{
"id": string,
"name": string,
"description": string,
"createdAt": ISOString,
"updatedAt": ISOString
}
]

Returned HTTP Codes

Http CodeDescription
200Success
404Glossaries not found
500Internal server error

Delete Glossary

Deletes a glossary specified in the request url.

Method: DELETE

Endpoint: https://api.revoiceit.com/glossary/{glossaryId}

Returned HTTP Codes

Http CodeDescription
204Glossary deleted successfully
404Glossary not found
500Internal server error

Add Glossary Term

Adds a term to the glossary specified in the request url. The languageId request parameter specifies the language that will be addressed by this rule, while the other parameters define the pronunciation that will be applied.

There are 3 different options for defining the pronunciation of a glossary term, so the optional body parameters should satisfy at least one of the following options:

Phonemize the word in a specific language

In this case phonemizationLanguageId and pronunciationLanguageId must both be provided. The phonemizationLanguageId will be used to define how the word is phonemized, while the pronunciationLanguageId will affect the accent used to pronounce the word. These two attributes can refer to the same language.

Add word's phonemization manually

In this case phonemization and pronunciationLanguageId should be provided. The phonemization refers to a custom phonemization that can be created using the International Phonetic Alphabet (IPA) notation.

Pronounce as

In this case pronounceAs and phonemizationLanguageId must be provided. The glossary term will be pronounced the same way that pronounceAs is pronounced in the specified language.

Method: POST

Endpoint: https://api.revoiceit.com/glossary/{glossaryId}

Request:

{
"word": string,
"languageId": string,
"phonemization": string,
"phonemizationLanguageId": string,
"pronunciationLanguageId": string,
"pronounceAs": string,
"caseSensitive": boolean
}

Request Fields:

FieldTypeDescriptionRequired
wordstringThe word for the glossary term.Required
languageIdstringSpecifies the target language that the rule applies to.Required
phonemizationstringCustom pronunciation using International Phonetic Alphabet (IPA) notation (e.g., c/i/a/o).Optional
phonemizationLanguageIdstringLanguage ID used to determine how the word is phonemized.Optional
pronunciationLanguageIdstringLanguage ID that determines the accent used for pronouncing the word.Optional
pronounceAsstringThe glossary term will be pronounced like the pronounceAs value in the specified language.Optional
caseSensitivestringIndicates whether the glossary term matching is case-sensitive.Optional

Response:

{
"id": string,
"glossaryId": string,
"word": string,
"languageId": string,
"phonemization": string,
"phonemizationLanguageId": string,
"pronunciationLanguageId": string,
"pronounceAs": string,
"caseSensitive": boolean,
"createdAt": ISOString,
"updatedAt": ISOString
}

Returned HTTP Codes

Http CodeDescription
201Term created successfully
400Invalid input
500Internal server error

Get Glossary Terms

Returns a list of the glossary terms that have been added to the glossary specified in the request url.

Method: GET

Endpoint: https://api.revoiceit.com/glossary/{glossaryId}/terms

Response:

[
{
"id": string,
"glossaryId": string,
"word": string,
"languageId": string,
"phonemization": string,
"phonemizationLanguageId": string,
"pronunciationLanguageId": string,
"pronounceAs": string,
"caseSensitive": boolean,
"createdAt": ISOString,
"updatedAt": ISOString
}
]

Returned HTTP Codes

Http CodeDescription
200Success
404Terms not found
500Internal server error

Update Glossary Term

Updates a glossary term specified by the termId in the url. In this case all body parameters are optional, an update will only update the specified attributes.

Method: PUT

Endpoint: https://api.revoiceit.com/glossary/terms/{termId}

Request:

{
"word": string,
"languageId": string,
"phonemization": string,
"phonemizationLanguageId": string,
"pronunciationLanguageId": string,
"pronounceAs": string,
"caseSensitive": boolean
}

Request Fields:

FieldTypeDescriptionRequired
wordstringThe word for the glossary term.Optional
languageIdstringSpecifies the target language that the rule applies to.Optional
phonemizationstringCustom pronunciation using International Phonetic Alphabet (IPA) notation (e.g., c/i/a/o).Optional
phonemizationLanguageIdstringLanguage ID used to determine how the word is phonemized.Optional
pronunciationLanguageIdstringLanguage ID that determines the accent used for pronouncing the word.Optional
pronounceAsstringThe glossary term will be pronounced like the pronounceAs value in the specified language.Optional
caseSensitivestringIndicates whether the glossary term matching is case-sensitive.Optional

Response:

{
"id": string,
"glossaryId": string,
"word": string,
"languageId": string,
"phonemization": string,
"phonemizationLanguageId": string,
"pronunciationLanguageId": string,
"pronounceAs": string,
"caseSensitive": boolean,
"createdAt": ISOString,
"updatedAt": ISOString
}

Returned HTTP Codes

Http CodeDescription
200Term updated successfully
400Invalid input
404Term not found
500Internal server error

Delete Glossary Term

Deletes the glossary term associated with the glossaryId specified in the request url.

Method: DELETE

Endpoint: https://api.revoiceit.com/glossary/terms/{termId}

Returned HTTP Codes

Http CodeDescription
204Term deleted successfully
404Term not found
500Internal server error