Browse
 
Tools
Rss Categories

Writing Grammars

1 A Simple Grammar

If you have not already done so, please see our SRGS Introduction for more information about our SRGS tutorial. We will begin our look at writing SRGS grammars with a simple grammar that lets the Engine recognize the words "yes" or "no." Yes or no grammars…

2 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, or grammars supporting occasional words from multiple languages. Within a grammar you may create rules that…

3 An SRGS Introduction

The LumenVox Speech Engine supports grammars (lists of words and phrases to be recognized by the Engine) written according to the Speech Recognition Grammar Specification, a W3C-defined standard for writing grammars. You may refer to the specification for…

4 Applying Grammar Weights

Ultimately, the Speech Engine is just a probability machine. Inside the Engine there are huge tables that store information about phonemes and the sounds produced by speech that correspond to those phonemes. When the Engine decodes audio input, it compares…

5 Lexicons

In addition to the phonetic spellings that can be placed directly in the grammar, multiple custom pronunciations can be grouped into a single file and referenced from an SRGS grammar. A collection of pronunciations like this is known as a lexicon. Lexicons…

6 Rule Expansions

Rule expansions are built by combining together small phrases with a number of grammar operations.The operations are: Operation GrXML Example ABNF Example Description Alternatives <one-of> <item><ruleref uri="#A"></item> <item><ruleref…

7 Rule References

You can reference grammar rules inside rule expansions, as we have already seen (in our simple yes or no grammar, the root rule referenced the yes and no rules). Rule references work slightly differently in ABNF and GrXML. ABNF Example $yesorno = $yes | $no;…

8 Special Rules

In addition to the rules you create, there are several reserved rules outlined in section 2.2.3 of the SRGS Specification. These rules dictate special behavior for the Speech Engine. While helpful and functional, these rules should be considered best used…

9 SRGS Best Practices

SRGS grammars, especially when combined with SISR, allow for the creation of very complex and flexible documents. The underlying logic of rule expansions and rule references makes writing SRGS grammars almost like developing small applications (and by adding…

10 Tags

Tags are special grammar tokens that can contain any information you wish to put in them. They are useful in transforming output, e.g. an application might accept "Yes," "Yeah," or "Yes please" but wish to return "TRUE" regardless of which is actually spoken.…

1 2 Next