legacy:vxi_developer_guide:voicexml_fundamentals:grammars

Grammars

A speech grammar specifies a list of vocabulary for the user to select in order to interact with the VoiceXML application.

Following is an example of how you could define a speech grammar:

<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form id="yyy">
<field name="xxx">
<grammar>
<![CDATA[
[
[excellent]
[good]
[fair]
[poor]
[help]
]
]]>
</grammar>
</field>
</form>
</vxml>

A DTMF defines a set of key presses for the user to supply when interacting with the VoiceXML application. Like speech grammars, the DTMF grammar can be either inline or external.

Following is an example of how you could define a DTMF grammar:

<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form id="yyy">
<field name="xxx">
<grammar>
<![CDATA[
[
[excellent dtmf-1]
[good dtmf-2]
[fair dtmf-3]
[poor dtmf-4]
[help dtmf-5]
]
]]>
</grammar>
</field>
</form>
</vxml>
  • legacy/vxi_developer_guide/voicexml_fundamentals/grammars.txt
  • Last modified: 2017/07/28 23:53
  • by javier