If you want to develop VoiceXML applications but don’t know where to start, this guide is for you. This 8-step guide contains all the information you need to start developing and deploying VoiceXML applications–prior experience is not required.
Requirements
You will
need the ability to transfer files via FTP to a Web server that is accessible on the Internet. You will also need a computer running Microsoft Windows NT, 2000, or XP with at least 128MB of RAM and at least 200 megabytes of free disk space. A Pentium II 350MHz processor is the bare minimum amount of CPU power that you will need. You will also need a
Sound Blaster compatible sound card.
Step 1 – Download and install Nuance V-Builder
Open a Web browser and go to http://extranet.nuance.com.
If you haven’t registered as a member of the Nuance Developer Network, click
on the link that is labeled "Sign
Up", otherwise login to the extranet site. Once you’ve logged in,
click on the Download link, then click on the Nuance V-Builder link. Download
the file named V-Builder-1-2-GA.exe.
The program is about 25 megabytes, so it’ll take a while to download if
you’re not blessed with a fast Internet connection.
Once you’ve completed the initial installation, launch
V-Builder and select Update Center in the Tools menu. You will be
prompted to enter your Nuance developer login and password. V-Builder will
connect to the V-Builder update server and return a list of modules, updates,
and plug-ins that are available. Before you can run any VoiceXML applications,
you will need to download a language pack. Language packs enable the speech recognition
functionality in V-Builder. For
example, I downloaded the English.America Master Package to be able to recognize
American English speech. You will also need to download the Nuance Java
SpeechChannel Pack and the Nuance Core Recognizer Essential Pack.
To enable text-to-speech functionality from within
V-Builder, you must manually download VOCALIZER-1-0-SP3-NT.zip
from the Nuance Developer Network Web site. Vocalizer includes an American
English synthesizer, but you will need to download a language pack from the Vocalizer
download site for other languages. Unzip the file, run Setup.exe, and follow
the instructions. The package will also install a copy of the Java 2 run time
environment.
You now have all the tools you need to develop a VoiceXML application. Now move on to Step 2.
Step 2 – Create a V-Builder project
The first time you start V-Builder, you will see a
welcome screen.
Select the first link to create a new project. You will be
prompted to create a new project directory that will hold the project dialogs,
grammars and audio files.
Click on the Create button to accept the default
directory. You can, of course, choose a different project directory and name if
you like.
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.
Step 5 – Upload the dialog to a public Web server
Once you’re satisfied with the voice dialog, you will need to upload the
main.vxml file to a Web server that is publicly available on the Internet. Make
sure you know the full Web URL to main.vxml on your Web server after it has been
uploaded. If you’ve uploaded the file into your Web root directory, and the
hostname of the Web server was www.myhost.com, then the URL would be http://www.myhost.com/main.vxml.
Once you’ve uploaded the file and have verified that you have the correct URL to
the file, proceed on to Step 6.
Step 6 – Set up your Voxeo developer account
You can be assured that voice dialogs developed in V-Builder will work on the
Voxeo platform because they utilize the Nuance Voice Web Server. Voxeo is a
Voice ASP, which means that they manage the hardware and software and provide
you with a toll-free phone number to access your VoiceXML application.
Customers dial the toll-free number which connects to a Voxeo gateway. The
gateway then interacts with your VoiceXML application, which resides on a Web
server somewhere on the Internet. You will first need to register
for a free developer account. Then you can login to your account on the Voxeo
Community Web site, http://community.voxeo.com.
When you login, you will be greeted by the Voxeo Account
Management screen as seen below. Click the <add new app> link.
About Jonathan Eisenzopf
Jonathan is a member of the Ferrum Group, LLC which specializes in Voice Web consulting and training. He
has also written articles for other online and print publications
including WebReference.com
and WDVL.com. Feel free to send an
email to eisen@ferrumgroup.com
regarding questions or comments about the VoiceXML Strategy series,
or for more information about training and consulting
services.