October 28, 2016
Hot Topics:

VoiceXML Quick Start Guide

  • September 28, 2002
  • By Jonathan Eisenzopf
  • Send Email »
  • More Articles »

Step 3 - Modify the main.vxml dialog

Once you've created a new project, double-click the main.vxml dialog in the project tab.

V-Builder includes the ability to drag and drop VoiceXML elements without having to know the language.


The main.vxml dialog includes a default form. You will need to make the following modifications:

  • Re-name the form to "main" by selecting the properties tab and changing the name attribute from "form1" to "main." 

  • Drag and drop a field object into the form.

  • Drop a grammar, prompt and filled object into the field object.

  • Drop a text object into the first prompt object and enter the following phrase in the text area of the general tab on the right, "What is your favorite color? Red, green or blue?" This will prompt the user to say their favorite color. 

  • Drop a prompt object into the filled object. This prompt will play back the color that the user selected. 

  • Drag a text object into the prompt object and enter "You said" in the text property text area. 

  • Drop a value object into the prompt object after the text object and set the expr attribute to =color in the property tab. This will output the user's selection that has been stored in the color field. 

  • Drop a clear object into the prompt object after the value object and set the namelist attribute to include the field color. This clears out the color field. 

  • Finally, drop a goto object into the prompt object after the clear object. Click on the "Select dialog and form" option and select main.vxml from the dropdown.


Now it's time to fill in the grammar for the colors that the system will recognize. For this example, we'll limit it to red, green and blue.

  • Select the grammar object and click on the "Use Inline Grammar" option.

  • Click the "Edit Inline Grammar" button. 

  • Right click on the grammar window and select "Insert New Expression". 

  • Enter the words red, green and blue in separate "Phrase Text" fields and select the OK button. To add more words, click the "Add Another Row" button.


The grammar diagram should now appear as below. This grammar will match any of the three words in the list.

Your first VoiceXML dialog is now ready for testing. Save the file and the proceed to Step 4.

Step 4 - Test the dialog

Now that the dialog has been completed, it's time to test it within V-Builder by pressing the button to run to dialog. If this is the first time the dialog has been tested, you will have to wait a few minutes for the speech recognition and TTS servers to start up. Once the servers are ready, you will see a green light in the "Run Dialog" window. Click the "Run Dialog" button. You will hear a computerized voice prompting you to select red, green, or blue. When you hear this, speak one of the colors into the microphone on your computer. The Nuance recognizer will fill in the color field with the recognized value, play it back and prompt again for a color until you click the "Hang Up" button. 

Continue on to Step 5 or repeat Step 3 and Step 4 until you are satisfied with your new VoiceXML dialog. 

Page 2 of 4

Comment and Contribute


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



Enterprise Development Update

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

Sitemap | Contact Us

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