- Contents
- Index
Interaction Speech Recognition Technical Reference
Example GrXML grammar file
The GrXML syntax uses elements and pairs of elements defined within
angle bracket characters (< >).
<!--Header--> <?xml version="1.0"?> <grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US" root="yesorno" mode="voice"> <!--Rules--> <rule id="yesorno"> <one-of> <item><ruleref uri="#yes" /></item> <item><ruleref uri="#no" /></item> </one-of> </rule> <rule id="yes"> <one-of> <item>yes</item> <item>correct</item> <item>yeah</item> <item>affirmative</item> </one-of> </rule> <rule id="no"> <one-of> <item>no</item> <item>nope</item> <item>negative</item> </one-of> </rule> </grammar>
To ensure that you can easily identify GrXML grammars when browsing a file system, use the .grxml file name extension.
For more information about the SRGS specification and how to create grammars, see http://www.w3.org/TR/speech-grammar/.

