Adding a grammar in a VoiceXML file

The VoiceXML specification http://www.w3.org/TR/voicexml21/ requires all valid spoken and telephone key-press inputs to be specified using a grammar. You can add grammars to your application in two ways:

This topic includes the following information:

Coding an inline grammar

Use one of the following methods:

Referencing an external grammar

After you create a grammar file, code a reference to it in your VoiceXML file.  For example, to use the external grammar file "mygrammar," you would use the following code:

<grammar src = "mygrammar.grxml" type="application/srgs+xml" />

Referencing an audio file

To use an audio file, specify the URI in your VoiceXML file <audio src= filename >.

Related Information
Speech Recognition Grammar Specification
Semantic Interpretation for Speech Recognition

Legal notices.