Prompt Databases in Web-based Voice Response Applications

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.

To add prompts to a page in a Web-based voice response application, use the Speech Application Language Tags (SALT) prompt element or add prompts to controls. QA controls, Command controls, and Microsoft ASP.NET Application Speech Controls in voice-only applications can include prompts.

Understanding Prompts

A prompt is a question or information spoken by a speech application. Typically a prompt is a question, such as "On what date do you want to depart?" However, it can also be a greeting, such as "What can I do for you?" or provide direction, such as "Press three."

Non-Speech Prompts

Prompt databases can also contain other audio used in the application. These non-speech entries might include things like silence (used to augment the timing of real prompts), background music, welcome jingles, or page transition sounds and beeps. It is good practice to keep all the non-speech prompt entries in a separate prompts project.

Prompt Engine Overview

In a Web-based voice response application, specify prompt text in code, either in the .aspx file by using Prompt Engine Markup Language or in a script function. The prompt engine converts written text into recorded audio output. The prompt engine produces synthetic speech by concatenating recorded words and phrases stored in the prompt database. The prompt engine searches the database for recorded segments that can be combined to match the specified text. For any segment, it might find one matching recording, more than one, or none.

When the prompt engine finds multiple matching recordings, it selects the best set of prompts to use. To determine the best set of prompts, the prompt engine determines how natural two speech segments sound when concatenated. Based on a comparison of the original recording's phonetic context to the new phonetic context, the recordings with more similar contexts are selected. The user must do two things to override the default prompt selection:

  • Add tags to extractions.
  • Use the prompt engine's peml:withtag XML markup to request specific prompts.

If the prompt engine fails to locate any recording for a segment, it uses a text-to-speech (TTS) engine to synthesize that segment's speech. The resulting prompt is rendered as TTS. The prompt engine does not mix prompts and TTS in a single prompt request unless the user specifically requests a mix using a TTS XML markup tag.

Selecting Prompts at Run Time in Web-based Voice Response Applications

In a Web-based voice response application, QA and Command controls or Application Speech Controls can include prompts. Add a prompt to a control in one of two forms:

  • As an inline prompt
  • As a prompt function

An inline prompt is a piece of static text that the prompt engine plays when the application activates a control. A good example is a WelcomeQA control that plays a friendly, professional greeting whenever a user opens the page. Inline prompts can be entered in any of three ways:

  • In the Properties window
  • On the Voice-Only Prompt page
  • Using the Prompt tag in HTML view

The following code example plays a greeting rendered as TTS.

<speech:QA id="qa1" PlayOnce=True >
<Prompt inlinePrompt="Welcome to the zoo!" />
</speech:QA>

Only one inline prompt exists for each control. If a control has an inline prompt, that prompt is the only prompt the control plays. An application cannot change an inline prompt at run time. Although inline prompts are simple and easy to add, they lack flexibility.

However, a prompt function dynamically generates a prompt at run time. To add prompt functions to QA or Command controls or to a Application Speech Control, see How to: Use Prompt Function Editor.

There are three general purposes for prompt functions:

  • Use prompt functions to provide confirmation prompts that change according to customer behaviors. For examples of this type of prompt, see:
    • The Prompts.pf file in the UserInputAndResults directory.
    • The PromptHelper.js file in the TableNavigation directory.
  • Use prompt functions to provide error or help prompts. For examples of these uses, see:
    • The Prompts.pf file in the SilenceAndLowConf directory.
    • The PastDate_prompt_questionDate function in the Prompts.pf file in the DatesAndValidation directory.
    • The SayInvalidDate_prompt function in the Prompts.pf file in the DatesAndValidation directory.
  • Use data normalization functions to control how data is spoken in prompts. Typically, data normalization translates digits and symbols into text, which the prompt engine then matches to recorded speech in the prompts database. For an example of this use, see:
    • The PastDate_prompt_acknowledgefunction in the Prompts.pf file in the DatesAndValidation directory.

Prompt select functions provide a convenient mechanism for defining all the possible prompts that each QA control can output. Additionally, because prompt functions have a standard interface, Prompt Validation can test these functions for coverage and completeness without actually executing the application. Prompt Function Editor is a powerful environment for prompt design and debugging.

Verifying Prompt Coverage

Verify prompt coverage before deploying an application. Coverage is a measure of the proportion of prompts that an application can play. Prompts must be present in the database, both as extractions and as sound recordings. For example, an application produces the prompt "Confirm that you have ordered <some number> pizzas." The number in this sentence can be any non-negative integer. The application might also prompt "Confirm that you have ordered no pizzas." If the word "No" is not recorded or marked as an extraction, the application has incomplete coverage.

See Also

Other Resources

prompt Element
Management of QA Controls
Prompt Projects and Databases
Develop Prompts with Speech Prompt Tools
SALT Programmer's Reference