Grammar Remarks
The Grammar control specifies a single speech recognition grammar resource. It can be used in the QA.Reco, Command and Dtmf controls. One Grammar control may be placed directly in any of these controls. Place more than one Grammar inside a Grammars collection.
Use the Grammar control to specify a grammar containing voice-mode rules only. Voice-mode grammar files recognize speech input, and DTMF-mode grammar files recognize DTMF input. Do not reference DTMF-mode grammar rules within voice-mode grammars, and do not reference voice-mode grammars rules within DTMF-mode grammars.
A Grammar control must specify a single voice-mode Grammar resource. Authors can specify the Grammar as one of two types:
An external grammar file referenced by the Grammar.Src property.
- or -
Grammar data contained between opening and closing Grammar tags. This type of Grammar resource can be referenced by the Grammar.InlineGrammar property.
Behavior of a Grammar that specifies more than one, or less than one grammar resource is undefined.
Within a Command control, Grammar tags require the speech:Grammar namespace prefix; within a QA control, they do not.
All properties are available at design time and run time. All of the properties that are defined are read/write properties.
Markup
<speech:Grammar properties >
</speech:Grammar>
<Grammars>
<speech:Grammar properties ></speech:Grammar>
<speech:Grammar properties ></speech:Grammar>
...
</Grammars>
See Also
Grammar Class | Grammar Constructor | Grammar Members | Grammar Properties | Grammar Methods | Grammar Events