Speaking to Users

  Microsoft Speech Technologies Homepage

A prompt is text that a voice-only application speaks to the user. Prompts ask users questions, greet users, provide information to users, and direct users to take specific action. QA controls must include at least one prompt. It can be an inline prompt that uses text-to-speech (TTS) synthesis, an inline prerecorded transcription, or a prompt function.

Use an inline prompt when the text of the prompt does not need to change at run time. Also, use an inline prompt when the text of the prompt needs only simple changes at run time. For example, a user may speak a size and topping of a pizza to a pizza ordering application. The size and topping may be stored in drop-down list elements on a Web page, and the application may use the values of these elements in an inline prompt to confirm the order.

Use prompt functions to dynamically generate prompts that require more than simple changes to the text of a prompt at run time. For example, use a prompt function to generate a prompt that uses the value of a specific Speech SemanticItem (SemanticItem) when a QA control has been accessed three times.

Use the Voice Output General panel of the QA Property Builder to associate inline prompts and prompt functions with a QA control.

To associate inline prompts with a QA control

  1. Right-click a QA control on an .aspx page, and on the shortcut menu, click Property Builder to open the General panel of the QA Property Builder.
  2. In the tree view pane on the left, under the Output heading, click General.

If a prompt database consisting of prerecorded transcriptions has already been added to the speech project, the QA control adds prompt engine markup language (PEML) markup that represents the prerecorded transcriptions to the page at run time. When the QA control activates any transcription or combination of transcriptions in this database, the prompt engine speaks the prerecorded transcriptions to the user.

Inline prompts can reference the values of SALT elements in addition to other controls on a page. The following SALT markup could be used by an application when confirming the size and topping of a pizza.

  Did you say a
    <salt:value TargetElement="SizeDropDown" TargetAttribute="value" />
    <salt:value TargetElement="ToppingsDropDown" TargetAttribute="value" />
pizza?

If no prompt database has been added to the speech project, or a database has been added but it does not contain prerecorded transcriptions for a specific prompt, the prompt engine uses text-to-speech (TTS) synthesis to speak the prompt to the user when this prompt is activated by the QA control.

To associate prompt functions with a QA control

  1. Right-click a QA control on an .aspx page, and on the shortcut menu, click Property Builder to open the General panel of the QA Property Builder.
  2. In the tree view pane on the left, under the Output heading, click General.
  3. Select Prompt Function.
  4. In the drop-down list, select the name of an existing prompt function, or select New to create a new prompt function.

Note  A prompt function file (.pf) must already exist before a developer can add a new prompt function.

For an example of how to use prompts, see the Recorded Prompts sample included in the SASDK.

For more information regarding the Output panel of the QA Property Builder, click Help.

See Also

Creating Speech-Enabled Web Pages | Designing Dialogue Flow | Dialogue Organization