Score Text/Markup Language
Markup language allows you to override Speechace lexicon and define your own.
Markup Syntax
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 or Validate Text requests.
Each markup has the pattern: [l1|l2|...|ln]{s1|s2|...|sn}
, where:
l1
,l2
, ...,ln
are substrings of a word in the input text, ands1
,s2
, ...,sn
are syllables of the word corresponding tol1
,l2
, ...,ln
.Each syllable,
si
, has this pattern:p1
p2
...pk
, wherepi
is a phoneme in ARPABET notation 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.
Markup Language Use-cases
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.
Request Response Example
We will evaluate the sentence using the markup language applied to the word "read," as demonstrated below:
The request parameters which you can see in the cURL below can be found in Score Text/Pronunciation.
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.
Last updated