190 likes | 348 Views
Voice Extensible Markup Language. VXML Dreadi Davis Tim Cortina. Overview. Overview History/Application Elements/Basics (w/ examples) Grammars Example(s). Overview.
E N D
Voice Extensible Markup Language VXML Dreadi Davis Tim Cortina
Overview • Overview • History/Application • Elements/Basics (w/ examples) • Grammars • Example(s)
Overview “VoiceXML is designed for creating audio dialogs that feature synthesized speech, digitized audio, recognition of spoken and DTMF key input, recording of spoken input, telephony, and mixed initiative conversations. Its major goal is to bring the advantages of Web-based development and content delivery to interactive voice response applications.” • www.w3c.org
Overview • VoiceXML creates voice applications to run on the phone much in the way HTML is used to create visual applications for the web. • Supports both voice input and keypad input • Can be used to record spoken input • Grammars can be very strict, emulate natural language, or be anything in between
History/Application • VXML specifications have been developed with the cooperation of a number of companies • AT&T (Bell Laboratories) • Motorola • IBM • Lucent Technologies
History/Application • Allow for telephone access to web applications without needing to purchase additional hardware • Wanted to replace touch-tone input with a hands-free approach
Application • Used in conjunction with voice recognizing software, java servlets, … • VoiceGenie • Speechworks
Basics/Elements • Start every page with: • <?xml version="1.0" encoding="UTF-8"?> • Top Level Element: • <vxml version=“2.0”> • Namespaces: • xmlns=http://www.w3.org/2001/vxml • xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance • xsi:schemaLocation="http://www.w3.org/2001/vxml • http://www.w3.org/TR/voicexml20/vxml.xsd
Hello World Example <?xml version="1.0" encoding="UTF-8"?> <vxml xmlns="http://www.w3.org/2001/vxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd" version="2.0"> <form> <block>Hello World!</block> </form> </vxml> www.w3c.org
Example With Input (see Example1.vxml)
Grammars • Define what input will be acceptable from the user. • They can define: • Length of input (in time) • Type of input (voice/DTMF) • (DTMF=Dual Tone Multi-Frequency) • The specific options/responses allowed • (see examples)
Built-in Grammars • VXML comes with predefined grammars that would be common, yet large to write • Digits • Boolean (yes, no, …) • Date • Currency (multiple, not just US) • Number (includes decimal points, and +/-) • Phone • Time • Used: <grammar src=“builtin:digits”/>
Natural Language Grammars • Designed to emulate how people would normally speak/respond • If asked “what do you want to do?”, in a banking application, you might say, • Hear my balance • I’d like to find out what my balance is • I need to know how much money I have in my accounts
Natural Language Grammars • Usually too complicated to handle by hand • (Not likely to think of all of the possible combinations of words) • SpeakFreely tool (Speechworks) • Create vocabulary • Create training sentences • Create testing sentences • Compile with the tool • (see example)
Error Catching <catch event="error.internal"> An Internal error has been caught. <log> <value expr="_message"/> </log> <exit/> </catch> <catch event="error.asr"> A Speech Recognition error has been caught. <log> <value expr="_message"/> </log> <exit/> </catch>
References • http://developer.voicegenie.com • www.w3c.org/TR/voicexml20/ • http://www.voicexml.org/