Score Text/Markup Language
Last updated
Last updated
Markup language allows you to override Speechace lexicon and define your own.
When markup_language=arpa_mark
is specified, the input text can have markups on zero, one or multiple words. This flag can be used in scoring pronunciation, multiple choice orrequests.
Each markup has the pattern: [l1|l2|...|ln]{s1|s2|...|sn}
, where:
l1
, l2
, ..., ln
are substrings of a word in the input text, and
s1
, s2
, ..., sn
are syllables of the word corresponding to l1
, l2
, ..., ln
.
Each syllable, si
, has this pattern: p1
p2
... pk
, where pi
is a phoneme in for the dialect.
If pi
is a vowel phoneme, pi
ends with 0, 1 or 2 to denote the stress level of the syllable.
There should be at most one vowel per syllable.
Marking up a word to explicitly specify syllable boundaries and phoneme mapping
There was [noth|ing]{n ah1 th|ih0 ng} on the rock.
Specifying which word is intended in a heteronym (i.e. 2 words which share the same spelling but have different pronunciation and meaning). Here the heteronyms are "read" and "fragments".
He [read]{r eh1 d} his [frag|ments]{f r ae1 g|m ah0 n t s} aloud.
Handling special acronyms, numbers, or terms
Agent [0||||07]{d ah1 | b ah0 l | ow1 | s eh1 | v ah0 n} worked for MI6.
We will evaluate the sentence using the markup language applied to the word "read," as demonstrated below:
Notice the different phonemes for both instances of the word "read" in the sentence and compare them with the phonemes present in the response for the same words.
For detailed explanation of markup language, refer the Markup Language .
The request parameters which you can see in the cURL below can be found in .