Adding Foreign Words

Using phonetic rules within an SRGS grammar, developers can build limited functionality for words in languages not supported by the Speech Engine.

Within a grammar you may create rules that are matched to phonetic spellings by using phonemes. By breaking foreign words into their constituent phonemes, grammars can effectively contain those words.

If a word contains a phoneme that does not occur in English, use the English phoneme that is closest to the foreign phoneme.

For instance, if you were going to build phonetic support for the German numbers zero through ten, you would begin by assembling a list of the digits along with phonetic pronunciations:

Number Phonemes
Null N UH L
Eins AY N S
Zwei
Zwo
S V AY | T S V AY
T S OW
Drei D R AY
Vier F IY R
F�nf F UW N F
Sechs Z EH K S
Sieben Z IY B EH N
Acht AA K T
Neun N OY N

Note that several of the phonemes are approximations. The "ch" sound in "acht" is different from the English phoneme represented by K, but since English does not have the phoneme from "acht" we pick the closest sound.

To enter a phonetic spelling as part of a rule within an SRGS grammar, include the phonetic spelling inside of quotes and curly braces. A basic ABNF grammar to return a spoken German digit might look like the following:

#ABNF 1.0;
language en-US;
mode voice;
tag-format <semantics/1.0>

root $Digits;

$Digit = ("{AY N S: eins}" {out="1"} | ("{S V AY: zwei}" | "{T S V AY: zwei}") {out="2"} | "{D R AY: drei}" {out="3"} | "{F IY R: vier}" {out="4"} | "{F UW N F: funf}" {out="5"} | "{Z EH K S: sechs}" {out="6"} | "{Z IY B EH N: sieben}" {out="7"} | "{AA K T: acht}" {out="8"} | "{N OY N: neun}" {out="9"} | "{N UW L: null}" {out="0"}); $Digits = {out=''} ($Digit {out+=rules.latest()})<1->;

An Example in Spanish

Though LumenVox now offers a Spanish language acoustic model, the following example using Spanish digits is provided to give developers a better idea of how to phonetically spell words.

Cero S EH R OW   |   S EY R OW
Uno AX N OW   |   UW N OW
Dos D AO S   |   D OW S
Tres T R EH S   |   T R EY S
Quatro K W AH T R OW
Cinco S IH NG K OW
Seis S EY Z
Siete S IY Y EH T EH
Ocho OW CH OW
Nueve N UW EH V EH   |   N UW W EH V EH   |   N UW EH V EY
© 2012 LumenVox LLC. All rights reserved.