1 / 20

Using VoiceXML, XHTML, and SCXML to Build Multimodal Applications

Using VoiceXML, XHTML, and SCXML to Build Multimodal Applications. James A. Larson. Agenda. SCXML controls the flow of an application SCXML controls modalities VoiceXML XHTML Others, e.g., InkML, SVG SCXML controls Web services. State Chart XML. Represents a state transition system

Download Presentation

Using VoiceXML, XHTML, and SCXML to Build Multimodal Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using VoiceXML, XHTML, and SCXML to Build Multimodal Applications James A. Larson

  2. Agenda • SCXML controls the flow of an application • SCXML controls modalities • VoiceXML • XHTML • Others, e.g., InkML, SVG • SCXML controls Web services

  3. State Chart XML • Represents a state transition system • States • Transitions A B

  4. Possible Actions within a <state> • Multimodal life cycle events <start … /> <cancel … /> <pause … /> <resume … /> <data … /> • Executable content <assign/> <var> <script/> <if/>, <elseif/>, <else/> <log/> A <if …> <start … /> <else/> <log …/> </if>

  5. SCXML • Sequentially perform the actions in two states <state id="A"> <prepare … /> <transition event= "done" target="B"/> </state> <state id="B"> <start … /> </state> A <prepare … /> done <start … /> B

  6. SCXML • Conditional branch <state id="A"> <prepare … /> <transition event= "done" cond="result='OK̍'" target="B"/> <transition event= "done" cond="result='Opps'" target="C"/> </state> A <prepare … /> done OK done Opps B C

  7. SCXML • Parallel States <state id="A"> <transition …. target="B"/> </state> <state id="B"/> <parallel> <state id="C"/> <state id="D"/> </parallel> </state> A B C D

  8. Agenda • SCXML controls the flow of an application • SCXML controls modalities • VoiceXML • XHTML • Others, e.g., InkML, SVG • SCXML controls Web services

  9. SCXML + VoiceXML <state id="A"> <start name= "getAirport.vxml" /> <transition event= "done" target="B"/> </state> A <?xml version="1.0"?> <vxml version="3.0" xmlns = "http://www.w3.org/2001/vxml"> <form id = "destination" > <field name = "Airport"> <grammar src= "airport.grxml"/> <prompt>Say your destination airport </prompt> <grammar src= “Airport.grxml” </field> <filled> <send event= "done" namelist = "Airport" /> </filled> </form> </vxml> getAirport.vxml done B state id="B"> <start … /> </state>

  10. SCXML + XHTML <state id="A"> <start name= "getAirport.xhtml" /> <transition event= "done" target="B"/> </state> A <html/> <head> <ev:listener ev:event="onchange" ev:observer="bodyId" ev:handler= "sendDone()" /> <script> {function sendDone…} </script> </head> <!--xhtml code --> <body id="bodyId"/><p>enter month</p> <input type="text" id="month"/> </body> </html> getAirport.xhtml done B state id="B"> <start … /> </state>

  11. SCXML + XHTML + VoiceXML A B <state id="A1"> <start name= "getAirport.vxml" /> <transition event= "done" target="B"/> </state> A1 <state id="A2"> <start name= "getAirport.xhtml" /> <transition event= "done" target="B"/> </state> A2 done done B state id="B"> <start … /> </state>

  12. Another example of multiple modalities SCXML + InkML + VoiceXML A B <state id="A1"> <start name= "getStuff.vxml" /> <transition event= "done" target="B"/> </state> A1 <state id="A2"> <start name= "getStuff.Inkml" /> <transition event= "done" target="B"/> </state> A2 done B state id="B"> <start … /> </state>

  13. SCXML + InkML + VoiceXML A B <state id="A1"> <start name= "getStuff.vxml" /> <transition event= "done" target="B"/> </state> A1 <state id="A2"> <start name= "getStuff.Inkml" /> <transition event= "done" target="B"/> </state> A2 <interpretation mode = "speech"> <travel> <to hook="ink"/> <from hook="ink"/> <day> Tuesday </day> </travel> </interpretation> done B state id="B"> <start … /> </state>

  14. SCXML + InkML + VoiceXML A B <state id="A1"> <start name= "getStuff.vxml" /> <transition event= "done" target="B"/> </state> A1 <state id="A2"> <start name= "getStuff.inkml" /> <transition event= "done" target="B"/> </state> A2 <interpretation mode = "ink"> <travel> <to>Las Vegas </to> <from>Portland </from> </travel> </interpretation> <interpretation mode = "speech"> <travel> <to hook="ink"/> <from hook="ink"/> <day> Tuesday </day> </travel> </interpretation> done B state id="B"> <start … /> </state>

  15. <interpretation mode = "interp1"> <travel> <to> Las Vegas </to> <from> Portland </from> <day> Tuesday </day> </travel> </interpretation> SCXML + InkML + VXML A B <state id="A1"> <start name= "getStuff.vxml" /> <transition event= "done" target="B"/> </state> A1 <state id="A2"> <start name= “getStuff.inkml" /> <transition event= "done" target="B"/> </state> A2 <interpretation mode = "ink"> <travel> <to>Las Vegas </to> <from>Portland </from> </travel> </interpretation> <interpretation mode = "speech"> <travel> <to hook="ink"/> <from hook="ink"/> <day> Tuesday </day> </travel> </interpretation> done B state id="B"> <start … /> </state>

  16. Agenda • SCXML controls the flow of an application • SCXML controls modalities • VoiceXML • XHTML • Others, e.g., InkML, SVG • SCXML controls Web services

  17. SCXML Control More Than Just Modalities vxml <start … /> • SQL • Complex calculations • Web services <start … /> sql <start … /> complexCalculation xhtml <start …/>

  18. References • State Chart XML (SCXML): State Machine Notation for Control Abstraction • http://www.w3.org/TR/scxml/ • Multimodal Architecture and Interfaces • http://www.w3.org/TR/mmi-arch/ • Commons SCXML (Open Source) • http://jakarta.apache.org/commons/scxml/

  19. Summary • SCXML controls the flow of an application • SCXML controls modalities • XHTML • VoiceXML • Others, e.g., inkML, SVG • SCXML controls Web services

More Related