This schema describes the SAPI 5.0 SR Command and Control grammar format which is based on the XML framework. The schema is included in the speech grammar compiler tool (gramcomp.exe or gc.exe) and does not need to be included in your grammar files. It is provided as a reference document.
NOTE: This schema is based on the Microsoft schema language and is not fully W3C compliant. This schema will be rewritten and will be compliant with the W3C standard once it has been approved by the W3C.
Defines the language ID of the XML grammar. If not specified, the grammar's LangID will default to the current user's UI language. The Speech Recognition engine must support the grammar's language Id for the grammar to successfully be loaded.
Specifies the type of the word(s) to be added to the grammar. Value must be the string "LEXICAL" with SAPI 5.0 and SAPI 5.1. See also SPGRAMMARWORDTYPE.
Specifies the delimiter that SAPI should use to separate an explicit lexicon entry in the grammar. The format is "LEXDELIMITER DisplayForm LEXDELIMITER LexicalForm LEXDELIMITER Pronunciation ;"
Specifies the string identifier that will be associated with a rule.
Specifies the numeric identifier that will be associated with a rule.
Specifies that the rule is a top-level rule. The value, "ACTIVE" or "INACTIVE" specifies whether the rule is to be active by default.
Specifies that the rule is exportable (i.e. can be loaded by an external grammar). By default, all grammars are not exportable. Dynamic rules or rules that reference dynamic rules cannot be exported.
Specifies that the rule should use the CFG-interpreter. See also the interface, ISpCFGInterpreter.
Specifies that the rule can be updated (dynamically) at runtime by using the ISpGrammarBuilder API.
Specifies the string identifier to be associated with the semantic property (name/value pair).
Specifies the numeric identifier to be associated with the semantic property (name/value pair).
Specifices the numeric value to be associated with the semantic property (name/value pair).
Specifices the string value to be associated with the semantic property (name/value pair).
Specifies the pronunciation for the given phrase tag.
Specifies the display form for the given phrase tag.
The default value for this is 1. The valid range of values for this is 0 to 255 and must be less than the value specified in MAX. Note: The value specified by MAX will be used when the specified MIN value is greater than the MAX value.
The default value for this is 1. The valid range of values for this is 1 to 255, or indicated by "INF" in text. This value indicates the maximum number of times valid recognitions of this element's contents may be recognized repeatedly. A value "INF" indicates that any number of recognitions may occur.
Specifies the numeric likelihood, or probability, that the transition should be recognized. The combined weights of the transitions leaving a given state should be equal to 1.
Specifies the numeric identifier associated with the rule to be referenced.
Specifies the programmatic identifier (ProgID) of the COM object which contains either the CFG interpreter or grammar rule.
Specifies the uniform resource locator (URL) address of the grammar to be referenced.
The top-level XML element containing all other XML elements needed to declare one Command and Control grammar.
The DEFINE tag contains a group of ID tags.
The ID tag defines named constants for rule ID, property value, and property ID elements.
This element describes the non-terminal RULE element. The contents must be non-empty concatenated recognition contents. Left recursion is not legal in a grammar. It is required that either the NAME or ID attribute is specified. If both are specified, then they must agree. All RULE NAMEs and VALs should be unique. Dynamic rules may not be exported.
This element is used to describe the Phrase element. It is a synonym of the P element. An associated property name and value pair will be generated only if the contents of this element are recognized.It is important to note that an empty PHRASE element is not allowed. Attributes may not be empty.
This element is used to describe the Phrase element. It is a synonym of the PHRASE element. An associated property name and value pair will be generated only if the contents of this element are recognized. It is important to note that a P empty element is not allowed.
This element is similar to the PHRASE element. The only difference between the PHRASE element and the OPT element is that the OPT element need not be recognized for the rule to be fired. An associated property name and value pair will be generated only if the contents of this element are recognized. It is a synonym for the O tag.
This element is similar to the P element. The only difference between the PHRASE element and the OPT element is that the OPT element need not be recognized for the rule to be fired. An associated property name and value pair will be generated only if the contents of this element are recognized. It is a synonym for the OPT tag.
Defines an expression of alternate phrase recognitions. Each subelement represents a possible separate recognition in place of this element. It is a synonym of the LIST tag. Emply elements are not valid (i.e. the tag must have children). The LIST element can define a default property name (PROPNAME) or id (PROPID) which will be inherited by it's child PHRASE elements.
Defines an expression of alternate phrase recognitions. Each subelement represents a possible separate recognition in place of this element. It is a synonym of the L tag. Emply elements are not valid (i.e. the tag must have children). The LIST element can define a default property name (PROPNAME) or id (PROPID) which will be inherited by it's child PHRASE elements.
This element describes the RULEREF tag which is non-terminal. It is used inside the contents of a rule definition (RULE) to reference another defined rule. The RULEREF tag may contain a semantic property (name/value pair) which will be returned if the rule is recognized.
Specifies that the recognized phrase should match at least MIN and at most MAX words from the dictation grammar. The DICTATION tag may contain an associated semantic tag (name/value pair) which will be returned if the DICTATION tag is recognized.
Specifies the grammar node is a grammar located in a standard Windows Resource grammar.
Specifies the grammar is from a text buffer, to be specified at runtime by the application. See also ISpRecoGrammar::SetWordSequenceData and ISpRecoGrammar::SetTextSelection.
Specifies a garbage word identifier for one or more non-silence sounds. The garbage word may be recognized by the Speech Recognition engine, but will NOT be returned to the application.