Volume 1, Issue 9 - October 2001
   
   
 

Answers to Your Questions About VoiceXML

By Jeff Kunins

In this monthly column, an industry expert will answer common questions about VoiceXML and related technologies. Readers are encouraged to submit questions about VoiceXML, including development, voice-user interface design, and speech technology in general, or how VoiceXML is being used commercially in the marketplace. If you have a question about VoiceXML, e-mail it to speak.and.listen@voicexmlreview.org and be sure to read future issues of VoiceXML Review for the answer.

This month we examine more questions from our readers.

Q: What's the deal and mixed-initiative? How does it work?

A: In "mixed-initiative" conversation, the caller (in theory) is prompted (and allowed) to answer the questions either all at once or in whichever order they choose. So, instead of having a conversation that looks like:

Service: What is your birth date? Please include the month, Day, and year.
Caller: June 20.
Service: You didn't say the full date. What is your birth date? Please include the month, day, and year.
Caller: June 20, 1958.
Service: Great. You said 06/20/1958. What is your Social Security Number?
Caller: 101-44-4938.
Service: Great. You said 101-44-4938.
(and so on)

We wind up with a conversation that looks like:

Service: What is your birth date and Social Security Number?
Caller: 101-44-4938.
Service: Got your SSN. What is your birth date? Please include the month, day, and year.
Caller: June 20, 1958.
Service: Got your birthdate. In summary, you said that you were born on 06/20/1958, and your
Social Security Number is 101-44-4938.
(and so on)

To do this, VoiceXML provides a couple of additional concepts:

1) Sub-grammars and "multi slot" grammars. The VoiceXML language itself doesn't legislate the list of specific grammar formats that are available. "Sub-grammars" and "multi-slot" grammars are a notion that aren't yet included in the W3C vendor-independent grammar formats, but are a part of other formats in common use today such as Nuance Communications' GSL (Grammar Specification Language) format. While a detailed exploration of multi-slot grammars is beyond what we'll discuss here, the basic concept is simple. A sub-grammar is an isolated grammar fragment (e.g. a list of airport codes) that is given a specific name and can be referenced by other grammars as a shortcut or component within them. Multi-slot grammars are a specific use of sub-grammars that allows developers to express situations where the caller is expected and allowed to answer one or more questions simultaneously. The grammar for each question is represented by a sub-grammar, and the result for each question populates a named "slot" within the top-level grammar. After recognition completes, the developer can examine which slots have (or have not) been filled and react accordingly. Mixed-initiative forms in VoiceXML are essentially a programmatic convenience for working with multi-slot grammars to build these kinds of conversational interfaces.

2) The <initial> element. The <initial> element is another form item (like fields and blocks) that can be included in a form. It's especially used for mixed-initiative forms, and is always placed as the before any fields in the form. The key behavioral difference between <initial> and <field> is that as soon as any slot in the top-level form grammar has been matched, its "name" variable is set and the FIA will not revisit it (won't replay its prompts) again unless the developer explicitly clears that variable somewhere along the way. In addition, <initial> elements can't contain a <filled> handler; all processing of what the caller said takes place in the individual fields within the form.

So, in summary, mixed-initiative is essentially a way to first prompt the caller to answer multiple questions at once, have a grammar construct that allows this to happen, and then fall back on directed dialogue (if needed) that sequentially walks the caller through any questions they neglected to answer in their original response.

Be sure to download our comprehensive mixed-initiative example. For more information about multi-slot grammars and sub-grammars, please see the documentation for the particular grammar format that you're using (and make sure that your VoiceXML platform supports it).

back to the top

Copyright © 2001 VoiceXML Forum. All rights reserved.
The VoiceXML Forum is a program of the
IEEE Industry Standards and Technology Organization (IEEE-ISTO).