ISpRecoGrammar (Windows Embedded CE 6.0)
1/6/2010
This interface enables applications to manage the words and phrases that the SR engine will recognize. It inherits from ISpGrammarBuilder.
Each object implementing ISpRecoGrammar can have a context-free grammar (CFG) and a dictation grammar loaded simultaneously (for example, using the CFG if possible, but returning to dictation if the CFG fails to parse). A single recognizer object implementing ISpRecognizer can have multiple speech recognition context objects (ISpRecoContext) associated with it. Similarly, a single context object can be associated with multiple objects implementing ISpRecoGrammar. This one-to-many relationship allows applications to separate types of recognizable phrases and content into separate objects for clearer application logic.
Methods
The following table lists methods for the ISpRecoGrammar interface.
Methods | Description |
---|---|
Gets the grammar identifier associated with the application. |
|
Gets recognition grammar state information. |
|
Gets the context object that created the grammar. |
|
Determines if a word has a pronunciation. |
|
Loads a command and control grammar from a file. |
|
Loads a command and control grammar from memory. |
|
Loads an engine proprietary format command and control grammar. |
|
Loads a command and control grammar from a Win32 resource. |
|
Loads and initializes a dictation topic. |
|
Allows applications using dynamic grammars to save the current grammar state to a stream. |
|
Sets a dictation state to active or inactive. |
|
Sets the state of a grammar. Changing the state affects the state of all the active rules in the grammar. |
|
Activates or deactivates a rule by its rule identifier. |
|
Activates or deactivates a rule by its rule name. |
|
Sets the insertion point (using word sequence data buffer). |
|
Sets word sequence data. |
|
Unloads the active dictation topic from the grammar. |
Requirements
Header | sapi.h, sapi.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |