- Installation
- Administration
- Programmer's Guide
- Grammars
- MRCP Server
- FAQs
Within an SRGS grammar, you can specify pronunciations of words using phonemes. Phonemes are the basic sounds that make up words. Specifying pronunciations this way is useful for adding alternative pronunciations to help deal with some proper names and to help support dialects or even foreign words.
To add a phonetic spelling to a rule, enclose the phonetic spelling within double quotation marks " " and curly braces { }.
For instance, the word "either" is commonly pronounced in two ways. One has a long I sound at the start (eye-ther) while the other starts with a long E sound (ee-ther). Broken into their phonemes, these two variants would be spelled as AY DH AXR and IY DH AXR.
A rule that contained the two variants of the word "either" might look like this:
A rule set up like this, however, will only return the phonemes if the rule is matched. If you want to get the actual word returned as raw text by the Engine, you need to enclose the word within the quotation marks and curly braces, but separate it from the phonemes with a colon.
Note that adding phonetic spellings is distinct from semantic interpretation, even though both use curly braces in ABNF (the curly braces for a phonetic spelling are always inside of double quotation marks).
Here is a Spanish grammar that uses these principles:
For a common application of phonetic spellings, see Adding Foreign Words. Our three-part video series on phonetic spellings may also give you a good idea of how this works.