Share via


Dialog Controls - Activation and Confirmation

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.

Dialog Speech Controls are designed for voice-only clients that have no visible graphical user interface (GUI). Dialog flow is driven by a client-side dialog manager that activates the controls on the page.

ASP.NET Speech Controls operate within an ASP.NET form, which serves as a container control. Authors of ASP.NET applications can use container controls to organize pages into logical groupings of controls and to apply styles to specific areas of a page. The ASP.NET form control is the default container for controls, but authors can create additional containers within the form and place groups of logically related or stylistically related controls within them.

Speech Command controls are associated with either a single Dialog Speech Control or a container of Dialog Speech Controls (that is, a Dialog Speech Control, the form, or a container control such as a panel contained within the form). The Scope property of a Command control specifies the ID of the container with which the control is associated. When authors place logically related groups of Speech Controls in separate containers, they can create distinct Command controls for each group.

When ASP.NET renders a page containing Dialog Speech Controls, it accumulates information about each control on the page. ASP.NET creates an internal list of Dialog Speech Controls in source order (that is, the order in which they are defined in the source code). Microsoft Visual Studio 2005 Web application designer forms can display controls in an order different than the source order.

ASP.NET also generates a client-side script with information about each Dialog Speech Control on the page. This script includes a call to the dialog manager, RunSpeech. When the client browser loads the rendered page, it executes the call to RunSpeech, which then accesses the information about the controls on the page.

RunSpeech

RunSpeech is a scripted object that runs on the Dialog Speech Controls client device. It manages an ASP.NET Web page containing application-specific dialog between a user and the client-side Dialog Speech Controls that interact with the user. These controls are speech call controls.

RunSpeech activates speech call controls to connect the telephony functions of the client device with the Dialog Speech Controls in the client browser. In a simple case, an AnswerCall control is the first Dialog Speech Control to be activated and a DisconnectCall control is the last to be activated.

Speech QA Controls

RunSpeech activates speech QA controls to ask the user for application-specific data items such as words, phrases, or dual tone multi-frequency (DTMF) input and to attempt to identify those items in the user's spoken or keyed response.

Speech Validator Controls

Speech Validator controls are triggered by events that occur when QA controls succeed in identifying specific data items. When an item fails to validate, RunSpeech activates the validator to inform the user that the data is invalid.

SpeechIndex

RunSpeech uses the SpeechIndex property to establish the speech order, which is the order in which it evaluates the controls on the page. Authors can use the SpeechIndex property to activate controls in an order different than their order in the source code.

ClientActivationFunction

The ClientActivationFunction property specifies a client-side routine that determines whether the control should be activated. This routine can evaluate the state of the client device, the state of the application, and the data that has been collected to make this determination. When RunSpeech evaluates the control, it calls the ClientActivationFunction routine and activates the control if the routine returns true and skips the control if the routine returns false. The default value of ClientActivationFunction is true. If a control does not specify a ClientActivationFunction routine, it is activated.

RunSpeech Activation Algorithm

RunSpeech activates the Dialog Speech Controls on the page following these steps:

  1. RunSpeech establishes the speech order of each control based on the control's source order and its SpeechIndex property, if defined. If a control has a SpeechIndex value, its speech order is its SpeechIndex value. If a control does not define a SpeechIndex value or defines a SpeechIndex value of zero, its speech order is calculated by adding a large constant number to its source order. This constant is larger than the maximum value of SpeechIndex and as a result, controls with SpeechIndex values precede controls without SpeechIndex values.
  2. RunSpeech examines the Dialog Speech Controls on the page in speech order, starting with the first control. When it finds a QA, validator, or Call Control that can be activated, it activates the control and begins this step again. If it does not find a QA, validator, or Call Control that can be activated, it proceeds to the next step.
  3. RunSpeech submits the page.

See Also

Concepts

RunSpeech - Example
Speech Dialog Controls Overview