SPGRAMMARSTATE (Microsoft Speech Platform)

Microsoft Speech Platform SDK 11

Microsoft Speech Platform

SPGRAMMARSTATE

SPGRAMMARSTATE lists controls for setting and restoring grammar states.

typedef enum SPGRAMMARSTATE
{
    SPGS_ENABLED = 0,
    SPGS_DISABLED = 1,
    SPGS_EXCLUSIVE = 3,
} SPGRAMMARSTATE;

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.