The Speechace API has long supported scoring pronunciation by passing an audio and a text of what the user is expected to speak. Speechace automatically handles ambiguity in terms of the expected pronunciation of the text passed to the API. This ambiguity includes situations such as:
Category | Description | Examples |
---|---|---|
Multiple Pronunciations | Words that have multiple acceptable pronunciations. | |
Heteronyms | Words with different pronunciation and meaning that share the same spelling. | the verb read (present) vs. read (past) |
Numbers | There are myriad ways to pronounce numbers depending on context and whether the number is a street address, a phone number, or something else. | |
Acronyms | Two, three, and four letter acronyms can be read one letter at a time or as a word. | CNN NASA |
Named Entities | Names of places, people, events including rare or made-up names. Speechace will automatically determine the expected pronunciation even for terms not in dictionary. | Volodymyr Zelenskyy Kharkiv pikpok |
But sometimes, the API caller wants one and only one pronunciation that they know from the context and wants to explicitly call that out. Today with the addition of markup language support you can easily markup words within the text passed to Speechace to do that.
You can now pass to Speechace API the parameter markup_langauge=arpa_mark
and markup words within the text as follows:
He [read]{r eh1 d} his [frag|ments]{f r ae1 g|m ah0 n t s} aloud.
Each markup has the pattern [word]{markup_sequence}
where:
[word]
is the intended word with syllable boundaries expressed using the |
separator{markup_sequence}
is a list of phonemes in Arpabet with stress notation and syllable boundaries expressed using the |
separatorYou can refer to the API Docs for details on the syntax and example API calls. The new markup_language is available for use within:
Finally this feature allows API callers to use their own lexicon or override the Speechace lexicon or processing for any term they wish. We hope you can try it out and let us know if you find other needs to markup or customize the processing of text passed to Speechace API.
All the best,
The Speechace Team