Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
Microsoft Speech Platform
SPGRAMMARSTATE
SPGRAMMARSTATE lists controls for setting and restoring grammar states.
<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>typedef enum SPGRAMMARSTATE { SPGS_ENABLED = 0, SPGS_DISABLED = 1, SPGS_EXCLUSIVE = 3, } SPGRAMMARSTATE;</strong> </pre>
Elements
SPGS_ENABLED
Activates all the top-level rules in the grammar for the SR engine.Note that a rule must have an active recognition context, active grammar, and active top-level rule in order to be recognized.
SPGS_DISABLED
Deactivates all the top-level rules in the grammar for the SR engine.SPGS_EXCLUSIVE
Turns off all top-level rules that are not part of this grammar.For example, an application that needs modal-like input exclusivity can change the grammar to exclusive, which disables all other non-exclusive grammars.