Title: VoiceXML-Voice Markup Language
1VoiceXML-Voice Markup Language
- Lu Shen
- Wireless E-Commerce Group
- Verizon Data Services
- August 10, 2000
2Topics
- Introduction
- How to Get Started
- Architecture of VoiceXML
- Components of a VoiceXML System
- Structure of VoiceXML Applications
- Overview of VoiceXML
3Introduction
- VoiceXMLVoice Extensible Markup Language
- Creating audio dialogs
- Digitized audio
- Recognition of spoken and DTMF key input
- Recording of spoken input
- Mixed-initiative conversations
4Goal of VoiceXML
- To provide voice access and interactive voice
response to Web-based content and applications - Leverage existing investment in Web technology
- Reuse of underlying infrastructure including
current database design, store procedures and CGI
scripts
5To Get Started
- VoiceXML browser
- http//www.alphaworks.ibm.com
- requires JDK1.2
- IBM ViaVoice
6Architectural Overview
VoiceXML
Voice
Client (e.g.PC)
Translation Process
Content Server
VoiceXML Gateway
7Components of a VoiceXML System
VoiceXML Gateway Services
VoiceXML Interpreter
Telephony Services Signal Processing
Speech Recognition
Audio Playback
Text-To-Speech Generation
HTTP Client Services
8Structure of VoiceXML Applications
Root Document
Document 1
Document 2
Document 3
Document 4
Document
Dialog 1
Dialog 2
Dialog 3
Dialog
Subdialog 1
Subdialog 2
Application
9Variable Scope Hierarchy
10Grammar
- Defines the allowable inputs submitted by the
user - Syntax format JSGF
- Java Speech Grammar Format
- Example
ltgrammargt visa visa master card
mastercard amex amex american
express amex lt/grammargt
11Most Basic Example
lt?xml version"1.0"?gt ltvxml version"1.0"gt
ltformgt ltblockgt ltempgtHellolt/empgt,
World! lt/blockgt lt/formgt lt/vxmlgt
Hello.vxml
12Basic Response - ltformgt
lt?xml version"1.0"?gt ltvxml version"1.0"gt
ltformgt ltfield name"drink"gt
ltpromptgtWould you like coffee, tea, milk, or
nothing?lt/promptgt ltgrammar
typeapplication/x-jsgf src"drink.gram"/gt
lt/fieldgt ltblockgt ltsubmit
next"http//drink2" namelist"drink"/gt
lt/blockgt lt/formgt lt/vxmlgt
drink.vxml
13Basic Response - ltmenugt
lt?xml version"1.0"?gt ltvxml version"1.0"gt
ltmenugt ltpromptgtWould you like
ltenumerate/gt?lt/promptgt ltchoice
next"http//..coffee.vxml"gtcoffeelt/choicegt
ltchoice next"http//..tea.vxml"gttealt/choicegt
ltchoice next"http//..milk.vxml"gtmilklt/choicegt
ltchoice next"http//..nothing.vxml"gtnothinglt/ch
oicegt ltnoinputgtYou must say
something.lt/noinputgt lt/menugt lt/vxmlgt
drink.vxml
14Menus vs.Forms
- Menus
- Grammars automatically generated
- No need to write grammars
- Simple to create automatically numbered short
lists - Forms
- Grammars allow flexibility and power for complex
phrases and dialog
15Execution Within One Document
lt?xml version"1.0"?gt ltvxml version"1.0"gt ltvar
name"hi" expr"'Hello World!'"/gt ltformgt
ltblockgt ltvalue expr"hi"/gt ltgoto
next"say_goodbye"/gt lt/blockgt lt/formgt ltform
id"say_goodbye"gt ltblockgt Goodbye!
lt/blockgt lt/formgt lt/vxmlgt
lt?xml version"1.0"?gt ltvxml version"1.0"gt ltvar
name"hi" expr"'Hello World!'"/gt ltformgt
ltblockgt ltvalue expr"hi"/gtGoodbye!
lt/blockgt lt/formgt lt/vxmlgt
16Executing a Multi-Document Application
Application root document (app-root.vxml)
Main document (main.vxml)
lt?xml version"1.0"?gt ltvxml version"1.0"gt ltvar
name"bye" expr"'Ciao'"/gt ltlink
next"operator_xfer.vxml"gt ltgrammargt
operator lt/grammargt lt/linkgt lt/vxmlgt
lt?xml version"1.0"?gt ltvxml version"1.0"
application"app-root.vxml"gt ltform
id"say_goodbye"gt ltfield name"answer"
type"boolean"gt ltpromptgtShall we say
ltvalue expr"application.bye"/gt? lt/promptgt
ltfilledgt ltif cond"answer"gt ltexit/gt
lt/ifgt ltclear namelist"answer"/gt
lt/filledgt lt/fieldgt lt/formgt lt/vxmlgt
17Subdialog
lt?xml version"1.0"?gt ltvxml version"1.0"gt
ltform id"sampleform"gt ltvar
name"cost" type"currency"/gt ltsubdialog
name"subdlg" src"subdlg.vxmlcostdetails"gt
ltfilledgt ltassign name"cost"
expr"subdlg.cost"/gt lt/filledgt
lt/subdialoggt lt/formgt lt/vxmlgt
18Subdialog(cont.)
lt!--subdlg.vxml--gt lt?xml version"1.0"?gt ltvxml
version"1.0"gt ltform id"costdetails"gt
ltfield name"cost" type"currency"gt ltpromptgt
This is from Subdialog, what is the cost of
this book lt/promptgt lt/fieldgt lt/formgt
lt/vxmlgt
19Directed Forms
ltform id"weather_info"gt ltblockgtWelcome to the
weather information service.lt/blockgt ltfield
name"state"gt ltpromptgtWhat state?lt/promptgt
ltgrammar src"state.gram" type"application/x-j
sgf"/gt lt/fieldgt ltfield name"city"gt
ltpromptgtWhat city?lt/promptgt ltgrammar
src"city.gram" type"application/x-jsgf"/gt
lt/fieldgt ltblockgt ltsubmit
next"/servlet/weather" namelist"city state"/gt
lt/blockgt lt/formgt
20Mixed Initiative Forms
ltform id"weather_info"gt ltgrammar
src"cityandstate.gram" type"application/x-jsgf"/
gt ltblockgt ltpromptgtWelcome to
the weather information service. lt/promptgt
lt/blockgt ltinitial name"start"gt
ltpromptgtFor what city and state would you like
the weather?lt/promptgt lt/initialgt
ltfield name"state"gt ltpromptgtWhat
state?lt/promptgt lt/fieldgt ltfield
name"city"gt ltpromptgtPlease say the
city in ltvalue expr"state"/gt for which
you want the weather.lt/promptgt
ltfilledgt ltif cond"city 'Los
Angeles' state undefined"gt
ltassign name"state" expr"'California'"/gt
lt/ifgt lt/filledgt
lt/fieldgt ...
21References
- Charles Arehart, etc., Professional WAP, Wrox
Press Ltd. - http//www.w3.org/TR/voicexml/
- http//www.voicexml.org