Management of QA Controls

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Answers and Confirms

The QA control collects data from the user and places it in SemanticItem controls for semantic processing.

A typical QA contains a DialogPrompt control that asks the user for information and an Answer control corresponding to each data item that the author expects the user to use in speech. Speech Server performs recognition of the user's response and returns a Semantic Markup Language (SML) item in which the elements of recognized text are organized semantically. Each Answer control specifies a particular semantic element of the results and a SemanticItem control to store and process that element.

The State property of the SemanticItem control indicates the semantic state of the Answer control. Values of Answer.SemanticItem.State are Empty, NeedsConfirmation, and Confirmed.

The Answer controls are grouped in collections within the QA control. The Answers collection contains Answer controls that collect data elements that respond directly to the QA prompt. The optional ExtraAnswers collection contains Answer controls that collect extra data elements that the user might use in speech. The Confirms collection contains Answer controls that collect sensitive data elements that must be explicitly confirmed by the user.

The process of explicitly confirming data usually requires a different style of prompt message than the process of collecting data. For this reason, QA controls are designed either to collect or confirm data. QA controls that collect data contain Answer controls in the Answers and ExtraAnswers collections, and those that confirm data contain Answer controls in a Confirms collection.

Activation Conditions

The RunSpeech object activates QA controls containing only Answers, or Answers and Confirms under the following conditions:

  • The ClientActivationFunction property is not present or returns true.
  • All the items specified in the Answers collection are empty.

RunSpeech activates QA controls containing only Confirms under the following conditions:

  • The ClientActivationFunction property is not present or returns true.
  • At least one Answer control in the Confirms collection needs confirmation.

Control Behavior When Activated

  • RunSpeech creates an associative array containing an element for each Answer object in the Answers, ExtraAnswers, and Confirms collections of the QA control. This associative array is later passed as a parameter to client-side functions such as PromptSelectFunction and GrammarSelectFunction.
  • RunSpeech increments the execution-count value of the control.
  • RunSpeech starts the DialogPrompt control.
  • If the BargeIn property is false, wait until the DialogPrompt is complete; otherwise proceed.
  • If the control contains a Reco object, start it.
  • If the control contains a DTMF object, start it.
  • If the control has Answer controls in the Answers or ExtraAnswers collections, RunSpeech processes the Answer controls semantically.
  • If the control has Answer controls in the Confirms collection, RunSpeech processes them semantically.

See Also

Concepts

SpeechControls Introduction