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 complete details on writing these grammars, but you may also find this primer a useful guide to most of the principles used in writing grammars. Our grammar creation white paper also has many useful tips for designing grammars.

Our grammar tutorial consists of the following parts, meant to be covered in order:

  1. A Simple Grammar
  2. Rule Expansions
  3. Rule References
  4. Special Rules
  5. Tags
  6. Applying Grammar Weights
  7. SRGS Best Practices

Please note that this grammar tutorial only addresses the Augmented Backus-Naur Format (ABNF), one of two formats defined by the SRGS standard. It is equivalent in all ways to the XML format also defined in the standard. Please refer to the full specification of the standard for more information about the GrXML format.

Once you understand writing grammars, you should read the tutorial on Semantic Interpretation for Speech Recognition (SISR) in order to take full advantage of the power and flexibility of SRGS grammars.

For information about loading and activating grammars via the API, see Working with Grammars in our Core Programmers Guide.

For general guidelines on creating good grammars, see our grammar creation white paper.


Was this article helpful?
Copyright (C) 2001-2024, Ai Software, LLC d/b/a LumenVox