October 18, 2018
Hot Topics:

VoiceXML Adventure Game

  • December 1, 2002
  • By Jonathan Eisenzopf
  • Send Email »
  • More Articles »

Next, we need to add handlers for the nomatch and noinput events using the methods specified in Page 4 of the previous tutorial.

Example 3.

<?xml version="1.0"?>
<vxml version="1.0">
<field name="answer">
<grammar> <![CDATA[
[dtmf-1 one] {<option "door1">}
[dtmf-2 two] {<option "door2">}
[dtmf-3 three] {<option "door3">}
[(touch the monkey)] {<option "monkey">}
<prompt> <audio>You are in a small room with three doors.</audio>
<audio>To open the first door, press or say 1.</audio>
<audio>To open the second door, press or say 2.</audio>
<audio>To open the third door, press or say 3.</audio>
<audio>You fool! That is not a choice I am giving you.</audio>
<audio>Press or say 1, 2, or 3.</audio>
<audio>What are you waiting for?</audio>
<audio>Press or say 1, 2, or 3.</audio>
<result name="door1">
<audio>You see a large hungry monkey.</audio>
<result name="door2">
<audio>You see another room with three doors, a man, and his monkey.</audio>
<result name="door3">
<audio>You see a man scratching his monkey.</audio>
<result name="monkey">
<audio>No! Do not touch the monkey!</audio>

Page 4 of 7

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.


Thanks for your registration, follow us on our social networks to keep up-to-date