|
|
 |
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:
|
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.
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
|