Share via


Activation and Semantic Processing

  Microsoft Speech Technologies Homepage

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

Containers

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, either a Dialog Speech Control, or 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. Note that Microsoft Visual Studio .NET 2003 Web application designer forms can display controls in an order different than source order.

ASP.NET also generates 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. RunSpeech 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 dialogue 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) tones, 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.

The preceding controls share two properties that enable authors to affect the activation of the control:

  • SpeechIndex
    RunSpeech uses the SpeechIndex property to establish 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 a 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 in order 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, then its Speech Order is its SpeechIndex value. If a control does not define a SpeechIndex value, or defines a SpeechIndex value of zero, then 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.

The RunSpeech Example demonstrates the activation, run-time behavior and basic error handling on a simple Dialog Speech Controls page.