Form Interpretation Algorithm

The form interpretation algorithm (FIA) drives the interaction between the user and a VoiceXML form or menu. A menu can be viewed as a form containing a single field whose grammar and whose <filled> action are constructed from the <choice> elements.

The FIA must handle:

  • Form initialization.
  • Prompting, including the management of the prompt counters needed for prompt tapering.
  • Grammar activation and deactivation at the form and form item levels.
  • Entering the form with an utterance that matched one of the form's document-scoped grammars while the user was visiting a different form or menu.
  • Leaving the form because the user matched another form, menu, or link's document-scoped grammar.
  • Processing multiple field fills from one utterance, including the execution of the relevant <filled> actions.
  • Selecting the next form item to visit, and then processing that form item.
  • Choosing the correct catch element to handle any events thrown while processing a form item.

The main loop of the FIA has three phases:

  • The select phase: the next unfilled form item is selected for visiting.
  • The collect phase: the selected form item is visited, which prompts the user for input, enables the appropriate grammars, and then waits for and collects an input (such as a spoken phrase or DTMF key presses) or an event (such as a request for help or a no input timeout).
  • The process phase: an input is processed by filling form items and executing <filled> elements to perform actions such as input validation. An event is processed by executing the appropriate event handler for that event type.

Note that the FIA may be given an input (a set of grammar slot/slot value pairs) that was collected while the user was in a different form's FIA. In this case the first iteration of the main loop skips the select and collect phases, and goes right to the process phase with that input. Also note that if an error occurs in the select or collect phase that causes an event to be generated, the event is thrown and the FIA moves directly into the process phase.

Related links