Chapter 5

Form-filling dialogs

Source code:

Available in GitHub

Exercises:

Don’t say it twice

VoiceXML supports the use of so-called tapered prompts. These are prompts that are designed for requesting or providing the same piece of information with different wording. In this way the user is not reprompted with exactly the same phrase. For example, we could have several phrases for the nomatch event, so that the message is not always “I have not understood what you said”.

In the simplified VXML considered in the FormFillLib we have not considered tapered prompts. You can implement them by adding a new attribute named count to the prompt, nomatch and noinput tags, and keeping track of the number of times a field has been visited in the DialogInterpreter class, so that each time a different message corresponding to the count is synthesized.

Happy API

There are hundreds of APIs that you can use to build your own form-fill apps (take a look here for some examples). We would like to hear how you get on!

To XML or to JSON, that’s the question

XML and JSON (and YAML) are the most popular options for parsing the results from web services. There are lots of discussions on the web about which is better, but they all have pros and cons. You can find some interesting arguments here: http://stackoverflow.com/search?q=json+vs.+xml, http://www.json.org/xml.html

Thus, you will find it useful to learn a bit more about JSON too. For example you can easily reuse the code in the chapter to build the parser for the MusicBrain app using JSON as shown here.

Suggested reading:

P. Deitel, H. Deitel, A. Deitel, and M. Morgano. Android for Programmers: An App-Driven Approach, Prentice Hall, 2011.

K. Jokinen and M. McTear. Spoken Dialogue Systems. Morgan & Claypool, 2010.

J. Larson, VoiceXML: Introduction to Developing Speech Applications. Prentice Hall Professional Technical Reference, 2002.

VoiceXML specification: http://www.w3.org/TR/voicexml20/

Link to VoiceXML resources: http://www.voicexml.org/resources


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s