Last reviewed: 3/23/2024 8:22:18 AM

Grammar Management Architecture

GrammarKit provides a simple way to compile speech recognition grammars. Applications compile grammars to enable real-time customization and tailoring of speech recognition.

Applications can compile the grammars and optionally persist the compiled grammar binary. Applications use GrammarKit to manage the activities for compiling the grammar. GrammarKit manages the resources and interacts directly with the grammar compiler. GrammarKit supports the following grammar syntax:

  • Microsoft SAPI 5 XML grammar, and
  • W3C SRGS XML.

Applications receive compiler warnings and error messages through event callbacks.

GrammarKit encapsulates all of the technologies necessary to make the process of compiling grammars simple and efficient. Optionally, it can persist the grammar binary to be used across application invocations.

GrammarKit Architecture for Grammar Management

GrammarKit simplifies the process of compiling grammars by handling the low-level activities directly with the grammar compiler.

Instantiate GrammarKit to compile a grammar within the application and destroy GrammarKit to release its resources when grammar compilation is no longer needed.