490 likes | 734 Views
VoiceXML. What is VoiceXML?. Voice Extensible Markup Language A standard language for voice applications Builds upon the work of earlier technologies: Motorola ’ s VoXML IBM ’ s SpeechML VoiceXML Forum Founders: AT&T, IBM, Lucent and Motorola Developed the VoiceXML 1.0 specification
E N D
What is VoiceXML? • Voice Extensible Markup Language • A standard language for voice applications • Builds upon the work of earlier technologies: • Motorola’s VoXML • IBM’s SpeechML • VoiceXML Forum • Founders: AT&T, IBM, Lucent and Motorola • Developed the VoiceXML 1.0 specification • Approved by the W3 consortium, May 2000
Voice Web Characteristics There is not one World Wide Web, but several • Users may be mobile • No expensive device or software needed • One-dimensional interface time • Dialog design a challenge • Interface suited to transactions rather than surfing • Session duration is less than usual
Browsing the Internet using voice Elements: • Computer • Network • HTML • Server: • Scripts • Multimedia Visual browsers vs. Voice browsers Elements: • Phone • VoiceXML • VoiceXML Gateway • Server • Scripts • Grammars
Advantages of VoiceXML • Cost savings • Main input/ output device (initially) is the phone • A voice browser (phone) instead of a web browser • Implementation of speech solutions without prior knowledge of voice technologies • Make the Web more accessible • To people with visual and motor disabilities • No need for wired connection, just a phone!
VoiceXML Document • Looks a lot like HTML • Tag based • To play an audio file or message • <audio> Hello world! </audio> • Different user Interaction • Audio output: • recorded and/or • text-to-speech (TTS) • Audio input: • touch- tone keys and/or • automatic speech recognition (ASR)
Growth of Voice Web-based Apps. • The growth in demand for voice services is driven by the rapid penetration of mobile phone use.
Forms • A form is simply used to present information to a user or to retrieve information from the user. 5 1 6
VoiceXML by Example <?xml version="1.0"?> <vxml version="1.0"> <form> <block>Hello World!</block> </form> </vxml>
Dialogs • VoiceXML defines two types of dialogs that the application uses to interface with the user: • forms • menus.
Forms • A form is simply used to present information to a user or to retrieve information from the user. • The <form> element generally includes a <goto> directive that tells the application where to jump based on the user's input.
Menu • A menu is a specialized form that forces the user to choose a specific option and then branch based on the option that was chosen. • A menu uses multiple <choice> elements to define where to transition to based on the user's selection.
A document may also have • <meta> elements, • <var> and <script> elements, • <property> elements, • <catch> elements, and • <link> elements.
Another Hello Example <?xml version="1.0"?> <vxml version="1.0"> <meta name="author" content="John Doe"/> <meta name="maintainer" content="hello-support@hi.example"/>
<var name="hi" expr="'Hello World!'"/> <form> <block> <value expr="hi"/> <goto next="#say_goodbye"/> </block> </form> <form id="say_goodbye"> <block> Goodbye! </block> </form> </vxml>
<?xml version="1.0"?> <vxml version="1.0"> <var name="hi" expr="'Hello World!'"/> <form> <block><value expr="hi"/>Goodbye!</block> </form> </vxml>
<?xml version="1.0"?> <vxml version="1.0"> <form> <block> Hello World Goodbye! </block> </form> </vxml>
<?xml version="1.0" ?> <vxml version="1.0"> <!--main_greeting form.--> <form id="main_greeting"> <block> <audio> Welcome to I T K 3 52 </audio> <goto next="#ssn_prompt" /> </block> </form> </vxml>
<?xml version="1.0"?> <vxml version="1.0"> <menu id="Simple_Example"> <prompt> <audio>Welecome to my voice mail. Say Mail to leave me a voice mail and Operator to return back to our operator. </audio> </prompt> <choice next="voicemail.vxml"> Mail </choice> <choice next="operator.vxml"> Operator </choice> <default><reprompt/></default> </menu> </vxml>
<?xml version="1.0" ?> <vxml version="1.0"> <form id="test"> <field name="drink"> <prompt> Please, select a drink, tea or coffee? </prompt> <grammar>[tea coffee]</grammar> <help>Say Tea or Coffee.</help> <filled> <prompt> Okay, You want a <value expr="drink" /> Please, Enjoy. </prompt> </filled> </field> </form> </vxml>
<?xml version="1.0"?> • <vxml version="1.0"> • <form> • <field name="drink"> • <prompt>Would you like coffee, tea, milk, or nothing?</prompt> • <grammar src="drink.gram" type="application/x-jsgf"/> • </field> • <block> • <submit next="http://www.drink.example/drink2.asp"/> • </block> • </form> • </vxml>
JSGF • The JavaTM Speech Grammar Format is a platform-independent, vendor-independent textual representation of grammars for use in speech recognition. • Grammars are used by speech recognizers to determine what the recognizer should listen for, and so describe the utterances a user may say. • JSGF adopts the style and conventions of the Java programming language in addition to use of traditional grammar notations.
Predefined Gramars <form id="getPhoneNumber"> <field name="PhoneNumber"> <prompt>What's your phone number? </prompt> <grammar type=“digits”/> <help> Please say your ten digit phone number. </help> </field> </form>
<MENU> <menu> <prompt> What do you want, coffee or tea? </prompt> <choice next="#getcoffee"> coffee </choice> <choice next="#gettea"> tea </choice> <noinput> Please say coffee or tea. </noinput> <nomatch> Please say coffee or tea. </nomatch> </menu>
< Disconnect> <block> You have selected coffee <disconnect /> </block>
< Record> <form> <record name="message" beep="true" maxtime="10s" finalsilence="4s"> <prompt> At the tone, please record your message </prompt> </record> <field name="confirm" type="boolean"> The message is <value expr="message“ mode="recorded"/> <prompt> To keep it, say yes. To discard it, say no. </prompt>
Record continue… . . <filled> <if cond="confirm"> Message saved, goodbye. <else/> Message discarded, goodbye. </if> </filled> </field> </form>
Forms • A form is simply used to present information to a user or to retrieve information from the user. 5 1 6
VoiceXML Calculator <?xml version="1.0" ?> <vxml version="1.0"> <form id="myCalculator"> <var name="result" /> <field name="op"> <!-- OPERATION --> <prompt> A Voice XML calculator. Choose add, or multiply. </prompt> <grammar>[add multiply]</grammar>
Add or multiply? <!-- Choose your operation, add or multiply --> <help>Say add, or multiply.</help> <filled> <prompt> Okay, let's <value expr="op" /> two numbers. </prompt> </filled> </field>
First number… <!-- FIRST OPERAND --> <field name="a" type="number"> <prompt>What’s the first number? </prompt> <help>Please say a number. This number will be the first operand. </help> <filled> <prompt> <value expr="a" /> </prompt> </filled> </field>
Second Number… <!-- SECOND OPERAND --> <field name="b" type="number"> <prompt>and the second number?</prompt> <help>Please say a number. This number will be the second operand. </help> <filled> <prompt> <value expr="b" /> Okay. </prompt> </filled> </field>
Adding (op==add) <block> <!-- NOW SAY THE RESULT --> <if cond="op=='add'"> <assign name="result" expr="Number(a) + Number(b)" /> <prompt> <value expr="a" /> plus <value expr="b" /> equals <value expr="result" /> </prompt>
Multiply (op==multiply) <elseif cond="op=='multiply'" /> <assign name="result" expr="a * b" /> <prompt> <value expr="a" /> times <value expr="b" /> equals <value expr="result" /> </prompt> </if> <clear /> <!-- clear all fields, and continue! --> </block> </form> </vxml>
References • VoiceXML Forum www.voicexml.org • Be Vocal Café café.bevocal.com • W3C WWW Consortium www.w3.org/TR/voicexml/
What is Voice XML Builder? • Project Goal • A development platform for voice-based applications • General Features • A Java / XML application • runs on multiple systems • Makes writing VoiceXML code a lot easier • Provides VoiceXML insert tag tree, • Parsed VoiceXML syntax colorizing • Tutorials, online reference and more… • No need to install • Access to it using a web browser
VoiceXML Builder Features • VoiceXML Builder • Designed as an editor for speech-based telephony applications • Compliant with the VoiceXML 1.0 Specification • General Purposes • Platform for the development of voice-based applications • Encourage the interest in voice browsing programs • Create Voice driven applications: • e-commerce • banking • voice portals
VoiceXML Tutorials • Tutorials act as guides on how to use the editor • They also provide insight on how to build vxml applications • Start up a tutorial • How to create a simple VoiceXML application http://www.acs.ilstu.edu/faculty/javila/vxml/index.html
VoiceXML Builder Demo http://www.acs.ilstu.edu/faculty/javila/vxml/index.html Lets create our first VoiceXML program!