1 / 19

VOICEXML 简介

VOICEXML 简介. Voice Extensible Markup Language. VOICEXML 的特点: 是全球的标准,与平台无关 可以在内存中执行,效率很高 为语音门户制定的 可以实现真正意义上的交互. VOICEXML 的构成:. 一个简单的 FORM 例子: HELLO WORLD <?xml version="1.0"?> <vxml version="2.0"> <form> <block>Hello World!</block> </form> </vxml>. MENU 例子一. < menu> <prompt>

adonai
Download Presentation

VOICEXML 简介

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. VOICEXML简介 Voice Extensible Markup Language VOICEXML的特点: 是全球的标准,与平台无关 可以在内存中执行,效率很高 为语音门户制定的 可以实现真正意义上的交互

  2. VOICEXML的构成: 一个简单的FORM例子:HELLO WORLD <?xml version="1.0"?> <vxml version="2.0"> <form> <block>Hello World!</block> </form> </vxml>

  3. MENU例子一 <menu> <prompt> Welcome home. Say one of: <enumerate/> </prompt> <choice next="http://www.sports.example.com/vxml/start.vxml"> Sports </choice> <choice next="http://www.weather.example.com/intro.vxml"> Weather </choice> <choice next="http://www.stargazer.example.com/voice/astronews.vxml"> Stargazer astrophysics news </choice> <noinput>Please say one of <enumerate/></noinput> </menu>

  4. MENU例子二 <menu> <property name="inputmodes" value="dtmf"/> <prompt> For sports press 1, For weather press 2, For Stargazer astrophysics press 3. </prompt> <choice dtmf="1" next="http://www.sports.example.com/vxml/start.vxml"/> <choice dtmf="2" next="http://www.weather.example.com/intro.vxml"/> <choice dtmf="3" next="http://www.stargazer.example.com/astronews.vxml"/> </menu>

  5. 一个应用可以有多个页面组成 ROOT DOCUMENT LEAF DOCUMENT

  6. Application root document (app-root.vxml) <?xml version="1.0"?> <vxml version="2.0"> <var name="bye" expr="'Ciao'"/> <link next="operator_xfer.vxml"> <grammar> <rule id="root" scope="public">operator</rule> </grammar> </link> </vxml>

  7. Leaf document (leaf.vxml) <?xml version="1.0"?> <vxml version="2.0" application="app-root.vxml"> <form id="say_goodbye"> <field name="answer" type="boolean"> < prompt >Shall we say <value expr="application.bye"/>?</prompt> <filled> <if cond="answer"> <exit/> </if> <clear namelist="answer"/> </filled> </field> </form> </vxml>

  8. FORM内部的元素

  9. 一个FIELD的例子 <field name="lo_fat_meal" type="boolean"> <prompt> Do you want a low fat meal on this flight? </prompt> <help> Low fat means less than 10 grams of fat, and under 250 calories </help> <filled> <prompt> I heard <emphasis><value expr="lo_fat_meal"/></emphasis>. </prompt> </filled> </field>

  10. 一个OBJECT的例子 <object name="debit" classid="method://credit_card/gather_and_debit" data="http://www.recordings.example.com/prompts/credit/jesse.jar"> <param name="amount" expr="document.amt"/> <param name="vendor" expr="vendor_num"/> </object>

  11. 一个RECORD的例子 <record name="greeting" beep="true" maxtime="10s" finalsilence="4000ms" dtmfterm="true" type="audio/wav"> <prompt> At the tone, please say your greeting. </prompt> <noinput> I didn't hear anything, please try again. </noinput> </record>

  12. 一个SUBMIT的例子 <submit next="log_request" method="post" namelist="name rank serial_number" fetchtimeout="100s" fetchaudio="audio/brahms2.wav"/>

  13. 一个TRANSFER的例子

  14. <transfer name="mycall" dest="tel:+358-555-1234567" transferaudio="elevator_music.wav" connecttimeout="60s" bridge="true"> <filled> <assign name="mydur" expr="mycall$.duration"/> <if cond="mycall == 'busy'"> <prompt> Sorry, our customer support team is busy serving other customers. Please try again later. </prompt> <elseif cond="mycall == 'noanswer'"/> <prompt> Sorry, our customer support team's normal hours are 9 am to 7 pm Monday through Saturday. </prompt> </if> </filled> </transfer>

  15. FIA Form Interpretation Algorithm <form> <field name = “first” cond = “true”> </field> <field name = “second” cond = “false”> </field> <object name =”third” cond = “true”> <filled> <goto next = …/> </filled> </object> <field name = “forth” expr = “value”> </field> <filled> <clear namelist="first"/> </filled> </form>

  16. VOICEXML的不足: 没有呼出的元素 没有会议的元素

  17. 谢谢大家

More Related