developer.com
Search EarthWeb
CodeGuru | Gamelan | Jars | Wireless | Discussions
Navigate developer.com
Architecture & Design  
Database  
Java
Languages & Tools
Microsoft & .NET
Open Source  
Project Management  
Security  
Techniques  
Voice  
Web Services  
Wireless/Mobile
XML  
New
 
Technology Jobs  

   Developer.com Webcasts:
  The Impact of Coding Standards and Code Reviews

  Project Management for the Developer

  Defining Your Own Software Development Methodology

  more Webcasts...




See The Winners!




Developer Jobs

Be a Commerce Partner














 


Developer News -
Why Firefox Doesn't Take Google Chrome Features    June 26, 2009
First Major PHP Update in Years Coming Soon    June 25, 2009
Red Hat CEO Calls on Oracle to Keep Java Open    June 25, 2009
Google Widens AdSense for iPhone, Android Apps    June 24, 2009
Free Tech Newsletter -

VoiceXML Quick Start Guide
By Jonathan Eisenzopf

Go to page: Prev  1  2  3  4  Next  

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. 

Go to page: Prev  1  2  3  4  Next  


Tools:
Add www.developer.com to your favorites
Add www.developer.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed


Voice Archives






internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs