1 / 74

VoiceXML

VoiceXML. ACS 352 Based on http://www.voicexml.org/tutorials/intro1.html. VoiceXML. VoiceXML is a Web-based markup language for representing human-computer dialogs.

thu
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 ACS 352 Based onhttp://www.voicexml.org/tutorials/intro1.html

  2. VoiceXML • VoiceXML is a Web-based markup language for representing human-computer dialogs. • VoiceXML assumes a voice browser with audio output (computer-synthesized and/or recorded), and audio input (voice and/or keypad tones). 

  3. VoiceXML Forum • VoiceXML 1.0 is also a specification of the VoiceXML Forum, an industry consortium of over 388 companies. 

  4. Voice Browser • The typical VoiceXML voice browser of today runs on a specialized voice gateway node that is connected both to the public switched telephone network and to the Internet.

  5. HTML vs. VoiceXML

  6. Telephones… • These voice gateways extend the power of the web to the world's 1,300,000,000 phones.

  7. WAP • The Wireless Application Protocol is a secure specification that allows users to access information instantly via handheld wireless devices such as mobile phones, pagers, two-way radios, smartphones and communicators.

  8. VoiceXML vs. WAP • WAP is a useful technology, but WAP screens are small and can be restrictive, and keypad input can be difficult.  • WAP is far harder than voice to use while driving, and it is available only in a tiny percentage of phones and geographic regions.  

  9. History of VoiceXML

  10. Voice XML 1.0 • VoiceXML Forum • AT&T, IBM, Motorola y Lucent Technologies • 398 compañias • VoiceXML 1.0 • Marzo 2000 • www.voicexml.org • World Wide Web Consortium • www.w3.org • Recomendación (Mayo 2000)

  11. Advantages • VoiceXML takes advantage of several trends: • The growth of the World-Wide Web and of its capabilities. • Improvements in computer-based speech recognition and text-to-speech synthesis. • The spread of the WWW beyond the desktop computer.

  12. Speech Technologies • Automated speech recognition (ASR) • Training • free-form dictation • Without Training • speech grammars

  13. Speech Technologies • Speech synthesis, or text-to-speech (TTS) • waveform concatenation speech synthesis

  14. IBM’s Voice Server

  15. PSTN • PSTN • Short for Public Switched Telephone Network, which refers to the international telephone system based on copper wires carrying analog voice data.

  16. XML and VoiceXML • Web data representation has advanced.  • XML is a general and highly flexible representation of any type of data, and various transformation technologies make it easy to map one XML structure to another, or to map XML into other data formats.  • VoiceXML is based on XML.

  17. What is XML? • The eXtensible Markup Language is really a meta-language. It is used to create markup languages, such as HTML. • Although it is very similar to SGML, being a subset, it differs in two main ways: it is • much more compact and efficient than SGML and is Web-native.

  18. Definition of XML Extensible Markup Language (XML) is the universal language for data on the Web. It gives developers the power to deliver structured data from a wide variety of applications to the desktop for local computation and presentation. XML allows the creation of unique data formats for specific applications. It is also an ideal format for server-to-server transfer of structured data.

  19. How XML is similar to HTML XML uses tags just like HTML, but those tags don’t define text formatting. Instead the tags are used to create data structures. Let’s see some examples…

  20. Examples of HTML and XML HTML Code: <b> This is bold text… </b> XML Code: <President> Clinton </President> Using our own custom tag named “President”, we have stored a small piece of information.

  21. Detailed Example XML Documents can be organized in a hierarchal fashion. Each tag or node can have “sub” nodes under it. <President> <Name>Clinton, Bill</Name> <Age>52</Age> <Terms>2</Terms> </President> Any number of nodes can be created under any given node. But each node must be “closed” using a closing tag, like </President>

  22. XML Elements A “Node” in an XML document is known as an Element. An XML document can have any number of elements. For example we could store information about 10 Presidents in a document.

  23. Multiple Elements <Car> <Manufacturer>Mitsubishi</Manufacturer> <Model>Eclipse</Model> <Year>1998</Year> </Car> <Car> <Manufacturer>Pontiac</Manufacturer> <Model>Sun Fire</Model> <Year>1997<Year> </Car> <Car> <Manufacturer>Nissan</Manufacturer> <Model>X-Terra</Model> <Year>2000<Year> <SUV>Yes</SUV> </Car>

  24. Attributes Besides having “sub-elements”, every element can also have what are known as Attributes. Attributes are declared “inside” the tag. You may already know how to use attributes if you have used the <IMG> or <A> tags in HTML. For example: <A HREF=“somepage.html”>click here</A>

  25. XML Attributes Here’s an example of an XML element with an Attribute…. <Vehicle VIN=“3232382432832”> <Year>1997</Year> <Make>Dodge</Make> </Vehicle> We could make any element an attribute…For example, Make and Year could also have been made attributes. However you usually want only some unique characteristic of the element to be an attribute. Examples: Serial #, SKU#, Stock symbol, Product ID etc.

  26. A Complete Example <Customer ssn=“325-93-3323”> <FirstName>Rachel</FirstName> <LastName>McKinnon</LastName> <Accounts> <Account AccountNumber=“0023003020”> <Type>Checking</Type> <CurrentBalance>10000</CurrentBalance> <OpenedOn>12/12/1999</OpenedOn> </Account> <Account AccountNumber=“4423 1121 1122 1425”> <Type>Credit Card</Type> <CurrentBalance>2000</CurrentBalance> <OpenedOn>4/1/1997</OpenedOn> </Account> </Accounts> </Customer>

  27. Try this one yourself …

  28. XML Editors

  29. XML Resources Microsoft Developer Network (MSDN) http://msdn.microsoft.com/xml The BizTalk Framework http://www.biztalk.org IBM’s XML Zone http://www.ibm.com/developer/xml/ W3C XML Standards Body http://www.w3c.org/xml

  30. XML Example; FIRST.XML <?xml version="1.0" encoding="ISO8859-1" ?> <?xml-stylesheet type="text/xsl" href="first.xsl"?> <CATALOG> <CD> <TITLE>Empire Burlesque</TITLE> <ARTIST>Bob Dylan</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>Columbia</COMPANY> <PRICE>10.90</PRICE> <YEAR>1985</YEAR> </CD> </CATALOG>

  31. <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <html> <body> <table border="2" bgcolor="yellow"> <tr> <th>Title</th> <th>Artist</th> </tr> <xsl:for-each select="CATALOG/CD"> <tr> <td><xsl:value-of select="TITLE"/></td> <td><xsl:value-of select="ARTIST"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> FIRST.XSL

  32. Make an XML Declaration • XML document type declaration:a mechanism that allows XML authors to communicate data to document readers (such as browsers). • This data includes: markup language, version, standalone document declaration and character encoding.

  33. XML document type declarations • <?xml version="1.0" standalone="yes"?> • <?xml version="1.0" standalone="no"?> • <?xml version="1.0" standalone="no" ENCODING="UTF-8"?>

  34. <? • These character open the declaration. • xml • This statement differentiates XML from other document formats, such as SGML and HTML. • version • This statement differentiates between versions of XML.Default Value: "1.0"

  35. standalone • The Standalone Document Declaration allows the document author to specify whether a document-type-definition is to be used. Possible Values: "yes", "no" • encoding • Ignore this feature unless you want to use another type of character encoding other than UTF-8. Default Value: "UTF-8" • ?> • These characters close the declaration.

  36. Example DTD(Document Type Definition)Novel Document Type • <?xml version="1.0" standalone="no"?><!DOCTYPE NOVEL [<!ELEMENT NOVEL (FORWORD,CHAPTER+,BIOGRAPHY?,CRITICALESSAY*)><!ELEMENT FORWORD (PARAGRAPH+)> <!ELEMENT CHAPTER (SECTION+|PARAGRAPH+)><!ELEMENT SECTION (PARAGRAPH+)> <!ELEMENT BIOGRAPHY(PARAGRAPH+)> <!ELEMENT CRITICALESSAY (SECTION+)> <!ELEMENT PARAGRAPH (#PCDATA)> <!ELEMENT SIGN (#PCDATA)>]>

  37. External DTD • <?xml version="1.0"?> <!DOCTYPE greeting SYSTEM "hello.dtd"> <greeting>Hello, world!</greeting>

  38. Internal DTD • <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE greeting [ <!ELEMENT greeting (#PCDATA)> ]> <greeting>Hello, world!</greeting>

  39. XML DTD • <?xml version="1.0" standalone="no"?><!DOCTYPE MEMO [<!ELEMENT MEMO (TO,FROM,SUBJECT,BODY,SIGN)><!ELEMENT TO (#PCDATA)><!ELEMENT FROM (#PCDATA)><!ELEMENT SUBJECT (#PCDATA)><!ELEMENT BODY (P+)><!ELEMENT P (#PCDATA)><!ELEMENT SIGN (#PCDATA)>]>

  40. XML DTD (Detail) • <!ELEMENT • Elements state their relationships with other elements, so that document readers understand how documents, complying to the DTD, work.

  41. +,*,?,| • These symbols represent the allowed use of elements. For example, if "+" is associated with an element, then that element must be used at least once and can be used limitlessly. • +: required and multiple *: optional and multiple ?: optional but singular

  42. #PCDATA • This statement, to a document reader, means text. If a DTD designer wants text to be allowed in a document, "#PCDATA" will be used in the DTD to state that.

  43. VoiceXML… Continue • What sorts of voice applications are best suited for VoiceXML?  • Information retrieval applications • V-Commerce • Telephone services • like personal voice dialing • Unified messaging applications

  44. VoiceXML Tags < element_name attribute_name="attribute_value"> ......contained items...... < /element_name>

  45. VoiceXML Documents • A VoiceXML application consists of one or more text files called documents. • These document files are denoted by a ".vxml" file extension and contain the various VoiceXML instructions for the application.

  46. Tags • It is recommended that the first instructions in any document to be seen by the interpreter be: <?xml version="1.0"?> <vxml version="1.0">

  47. Hello World!" example <?xml version="1.0"?> <vxml version="1.0"> <form> <block>Hello World!</block> </form> </vxml>

  48. VoiceXML defines two types of dialogs that the application uses to interface with the user: • forms • menus.

  49. Forms <?xml version="1.0"?> <vxml version="1.0"> <form id=“Something"> -- content -- </form> </vxml>

  50. VoiceXML: Dialogs • VoiceXML dialogs • Each dialog is in a form

More Related