SPCFGRULEATTRIBUTES

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

SPCFGRULEATTRIBUTES

SPCFGRULEATTRIBUTES lists the attribute information of grammar rules.

typedef enum SPCFGRULEATTRIBUTES
{
    SPRAF_TopLevel,      
    SPRAF_Active,        
    SPRAF_Export,        
    SPRAF_Import,        
    SPRAF_Interpreter,   
    SPRAF_Dynamic,       
    SPRAF_AutoPause     
} SPCFGRULEATTRIBUTES;

Elements

SPRAF_TopLevel
Flag specifying that the rule is defined as a top-level rule. Top-level rules are the entry points into the grammar and can be de-/activated programmatically. This can be set using the TOPELVEL attribute in the Speech Text Grammar Format.
SPRAF_Active
Flag specifying that the rule is defined as a top-level rule that is activated by default. These rules can be de-/activated by calling De-/ActivateRule(NULL, 0, ...). This can be set using the TOPLEVEL="ACTIVE" attribute-value pair in the Speech Text Grammar Format.
SPRAF_Export
Flag specifying that the rule is exported and hence can be referred to by a rule in another grammar. This can be set using the EXPORT="YES" attribute-value pair in the Speech Text Grammar Format.
SPRAF_Import
Flag specifying that the rule is imported from another grammar and is therefore not defined in this grammar.
SPRAF_Interpreter
Flag specifying that the rule has an interpreter (custom C/C++ code implementing the ISpCFGInterpreter interface) associated with it.
SPRAF_Dynamic
Flag specifying that the rule is dynamic (can be changed programmatically through the ISpGrammarBuilder interface). Note that the CFG must be loaded with the SPLO_DYNAMIC flag to enable changes at run time.
SPRAF_AutoPause
Flag specifying the grammar attributes as AutoPause. This flag is only valid at run time as part of a rule state and is not valid to pass as part of a rule definition.