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:
Field | Type | Description | Required |
name | string | The name of the glossary. | Required |
description | string | A brief description of the glossary and its purpose. | Optional |
Response:
{
"id": string,
"name": string,
"description": string,
"createdAt": ISOString,
"updatedAt": ISOString
}
Returned HTTP Codes
Http Code | Description |
201 | Glossary created successfully |
400 | Invalid input |
500 | Internal 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 Code | Description |
200 | Success |
404 | Glossaries not found |
500 | Internal 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 Code | Description |
204 | Glossary deleted successfully |
404 | Glossary not found |
500 | Internal 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:
Field | Type | Description | Required |
word | string | The word for the glossary term. | Required |
languageId | string | Specifies the target language that the rule applies to. | Required |
phonemization | string | Custom pronunciation using International Phonetic Alphabet (IPA) notation (e.g., c/i/a/o). | Optional |
phonemizationLanguageId | string | Language ID used to determine how the word is phonemized. | Optional |
pronunciationLanguageId | string | Language ID that determines the accent used for pronouncing the word. | Optional |
pronounceAs | string | The glossary term will be pronounced like the pronounceAs value in the specified language. | Optional |
caseSensitive | string | Indicates 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 Code | Description |
201 | Term created successfully |
400 | Invalid input |
500 | Internal 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 Code | Description |
200 | Success |
404 | Terms not found |
500 | Internal 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:
Field | Type | Description | Required |
word | string | The word for the glossary term. | Optional |
languageId | string | Specifies the target language that the rule applies to. | Optional |
phonemization | string | Custom pronunciation using International Phonetic Alphabet (IPA) notation (e.g., c/i/a/o). | Optional |
phonemizationLanguageId | string | Language ID used to determine how the word is phonemized. | Optional |
pronunciationLanguageId | string | Language ID that determines the accent used for pronouncing the word. | Optional |
pronounceAs | string | The glossary term will be pronounced like the pronounceAs value in the specified language. | Optional |
caseSensitive | string | Indicates 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 Code | Description |
200 | Term updated successfully |
400 | Invalid input |
404 | Term not found |
500 | Internal 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 Code | Description |
204 | Term deleted successfully |
404 | Term not found |
500 | Internal server error |