Click Here to go to the BeVocal Café Home Page Call Now to Test Your App: 1.877.33.VOCAL

Login
Sign-Up
Home
Welcome

Tools & File Management
Resources
•  Audio
•  DTD
•  Airport/Airline Codes
•  3rd-Party Resources
•  VoiceXML Samples
Deployment
Documentation
Support
VoiceXML Samples
Home > Resources > VoiceXML Samples
Advanced search

The samples are divided into 2 main categories:

VoiceXML Language Samples

These are samples of using various aspects of both standard VoiceXML and BeVocal extensions to it.

Example Description Illustrates
Hello World The canonical Hello World example. The <vxml>, <block>, and <form> tags.
Basic Menu A simple menu. Using <menu>, <enumerate> and <choice> to create a menu.
Main Menu Using JSP A Java Server Page (JSP) sample that generates a menu. Click here for details. Using a JSP to generate a menu that uses <menu>, <enumerate>, and <choice>.
JavaScript Using JavaScript within VoiceXML. Broken into the following categories:
•  Operators
•  Statements
•  Global Properties & Functions
•  Array Object
•  Date Object
•  Math & Number Objects
•  RegExp Object
•  String Object
•  Object, Function, & Error Objects
Basic JavaScript functionality supported within VoiceXML, including examples of all of the builtin object methods and properties.
Calculator A 4-function calculator. The <meta>, <grammar>, <link>, <help>, <noinput>, <nomatch>, <var>, <prompt>, <filled>, <if>..<elseif>, <assign>, <clear>, and <value> tags.
Calculator2 A 4-function calculator which allows more free-form utterances such as "five plus six" or "ten times nine" The <script> and <audio> tags and the use of mixed initiative dialog using the <initial> tag. Includes a complex grammar which allows sentences such as "ten times ten" in a single utterance.
Factorial A simple factorial example. The <script> tag, using the BeVocal Audio library, declaring and calling JavaScript functions.
Say-As Types Text pronunciation. How the various values of the type attribute of the <say-as> element affect pronunciation.
Haiku Poem Generator Generates Haiku poems using concatenated words or backup TTS when words do not exist. Using ECMAScript DOM, <data> to reference an XML vocabulary file, <audio expr="myArray"/> to dynamically generate prompts, streaming.
N-Best Demonstrates the N-Best and Multiple Interpretations features of the VoiceXML Interpreter. Additional file: nbest.pl. The maxnbest property, application.lastresult$ variable, and dynamic generation of a <subdialog> by a server-side script.
Nuance SayAnything Grammar Demonstrates a Nuance SayAnything grammar for interpreting fairly free-form utterances about flight information. SayAnything grammar, Mixed-initiative dialogs
Record An application that records what the user says and then sends it to a server-side backend. The backend sends the recorded utterance as an attachment in an e-mail. Additional files: sendmail.jsp, sendmail.pl. Saving the recorded utterance in the backend using JSP/Perl script, attaching the recorded utterance to the e-mail.
Recorder
A voice recorder, that stores the result to your Web site <record>, <submit>, POST, using a Perl cgi-bin application to parse incoming POST parameters.
Speaker Verification Use of the BeVocal Speaker Verification extension to register and verify a caller's voice print. The <bevocal:register> and <bevocal:verify> tags. The <bevocal:register> tag gets user input to create a unique voice print. An authentication dialog then uses the <bevocal:verify> tag to match a caller against that voice print.
Echoing Strings Use a SOAP-based Web service to echo a string. For more information, see Echo Service. Additional file: echo.java. Using a simple SOAP-based Web service with VoiceXML.
Google Spell Use a Google SOAP service to get corrected spelling of a word. Using another simple SOAP-based Web service with VoiceXML.

BeVocal Platform Services Samples

These samples demonstrate using the BeVocal Platform Services.

Service Sample
Call Detail Record Access Service Apache sample: CDRSample.zip
Log Access Service Apache sample: LogSample.zip
Perl sample: getLog.pl
Speech Vendor Log Access Service Apache sample: SpeechVendorLogSample.zip
Media Access Service Apache sample: MediaSample.zip
Outbound Notification Service Apache sample: OutboundSample.zip
Visual Basic sample: vb.net_outbound_client.zip
Perl samples: makeCall.pl, cancelCall.pl, getStatus.pl
Location Information Service Apache sample: LocationInfoSample.zip
Perl samples: geo.pl, phoneToZIP.pl
Grammar Compilation Service Apache sample: GrammarCompilationSample.zip
Enrolled Grammar Removal Service Apache sample: PhraseRemovalSample.zip
Getting Lots of Logs This sample uses CDR Access, Log Access, and Speech Vendor Log Access Services to retrieve many call logs.
Perl sample: getLogsInTimePeriod.pl
Storing Security Keys You can use this Perl script with the other Perl samples. In this file, you store the security keys needed by the services.
Perl sample: keyRing.pl

Apache Samples

Each sample is self contained. Each .zip file contains all source, scripts and supporting .jar files to make the sample functional. The compiled classes are also included so that if only the Java Runtime is available, the sample can still be used.

Each sample contains a cmp.bat file which can be used to compile the sample after the .zip file has been unarchived. The run<servicename>.bat executes the sample code. This script expects one parameter — the name of the service method to be invoked, which must first be defined in the <servicename>Client.properties file. If there is missing or incorrect information provided for this parameter, the sample displays a message that summerizes the errors and provides execution format information.

Each sample requires at least three parameter values be provided. These parameters are unique to each customer. The key, organizationId and applicationId values are obtained via request from BeVocal.

Perl Samples

If you use any of the Perl samples, you need to have CYGWIN and SOAP::Lite installed on your machine.

  • For information on downloading and installing CYGWIN, go to http://www.cygwin.com. Once you've installed CYGWIN, make sure that it has installed xsltproc.

  • To install SOAP::Lite for use with Perl, do the following:
    	perl -MCPAN -e shell
	cpan> force install SOAP::Lite 
	cpan> quit



BeVocal, Inc. Café Home | Developer Agreement | Privacy Policy | Site Map | Terms & Conditions
©1999-2007 BeVocal, Inc. All Rights Reserved | 1.877.33.VOCAL