Partilhar via


Validating Prompts

  Microsoft Speech Technologies Homepage

One of the debugging tasks to complete before deploying an application is to verify prompt coverage. Coverage is a measure of the proportion of prompts that an application can play. For example, an application produces the prompt "Confirm that you have ordered <some number> pizzas." The number in this sentence can be any integer from zero upward. The application logic may call for the prompt "Confirm that you have ordered no pizzas." The word "no" might not have been recorded and marked as an extraction.

If any part of a prompt is not present in the database, the prompt engine plays the prompt using text-to-speech (TTS) rather than using the recorded voice from the database. To create more professional-sounding applications, ensure that there is 100 percent prompt coverage. Use the Prompt Validation tool, included in Speech Prompt Editor, to validate prompt coverage.

A second, related debugging task is to check the quality of prompts when various extractions are combined and played in sequence. A pizza-ordering application might have the option of three sizes and four toppings, which can be combined in a variety of confirmation prompts. One such prompt might be "You ordered a medium mushroom pizza." How do the extractions "medium" and "mushroom" sound when combined in this phrase? How do "large" and "mushroom" sound when played together, or "small" and "pepperoni"? Use the Prompt Validation tool to test extraction sound quality.

Testing Extractions

There are three ways to test extractions using the Prompt Validation tool:

  • Dragging extractions from the Extractions window into the Prompt Validation window
  • Typing any text directly into the Prompt Validation window
  • Importing files

Each of these ways is described in the following sections.

To open the Prompt Validation tool

There are two ways to open the Prompt Validation tool.

  • On the View menu, click Prompt Validation
  • - or -
  • On the Speech Prompt Editor toolbar, click Prompt Validation.

Using the Drag-and-Drop Feature to Combine Extractions

Use the Prompt Validation window to evaluate the audio quality of extractions, and to verify their presence in the prompt database. Extractions can be tested and played in any combination and sequence. Speech Prompt Editor runs a debug compile and displays results in the Prompt Validation Results window. Speech Prompt Editor displays the recordings found in the database as a blue hyperlink. If a recording is not found in the database, it is displayed in red.

To drag extractions into the Prompt Validation window

  1. Drag extractions from the Extractions window to the Prompt Validation window in the preferred sequence.
  2. On the Prompt Validation toolbar, click Do Validate.
  3. In the Prompt Validation Results window, expand the results.
  4. To hear the extractions, on the Prompt Validation Results toolbar, click Play Output.
  5. To continue testing other extractions, click the Prompt Validation tab and delete the current entry.

Entering Text

Enter plain text in the Prompt Validation window to check for prompt coverage of specific phrases or sentences. If matching prompts are not found, the TTS engine renders the phrase.

To enter text into the Prompt Validation window

  1. In the Prompt Validation window, enter plain text. Alternatively, enter valid Prompt Engine Markup Language, for example a transcription enclosed in TTS tags.
  2. On the Prompt Validation toolbar, click Do Validate.
  3. In the Prompt Validation Results window, expand the results.
  4. To hear the prompt, on the Prompt Validation Results toolbar, click Play Output.
  5. To continue testing other extractions or XML, click the Prompt Validation tab and clear the entry in the input window.

Importing Files

An alternative to typing text directly into the input window is to enter the text in a Unicode-encoded text file, and then import the file.

To import files into the Prompt Validation window

  1. On the Prompt Validation toolbar, click Import Text.
  2. Use the Import Text dialog box to point to a text file, and then click Open.
  3. On the Prompt Validation toolbar, click Do Validate.
  4. To hear a phrase, click to expand the tree, select a phrase, and on the Prompt Validation Results toolbar, click Play Output.

Validating Solutions

Before deploying the application, ensure that all the prompts that could possibly be called are recorded and present in the database. If prompt recordings are not in the database, they are not available to the prompt engine.

The testing process consists of the following steps.

  1. Speech Prompt Editor searches for every Web project in the solution.

  2. Speech Prompt Editor searches in every Web project for each .aspx file, and runs each inline prompt. Speech Prompt Editor also searches any QuestionPrompt properties that are associated with Microsoft ASP.NET Application Speech Controls. Speech Prompt Editor also searches any Basic Prompt controls InlineContent property.

    Note  Speech Prompt Editor does not search the default prompts associated with Application Speech Controls during validation.

  3. Speech Prompt Editor searches in every Web project for each .pf prompt function source file.

  4. The prompt engine then runs each prompt function to test all possible alternatives, using the validation values specified in Prompt Function Editor as parameters.

  5. The prompt engine processes the returned strings, and then displays them as validation output in the Prompt Validation Results window.

The phrases found in the prompt database are highlighted as hyperlinks. Click a link to open the appropriate prompt database and select the extraction. A word or phrase that is completely missing from the database displays in bold red with no underline or hyperlink. Phrases that are found with incorrect tags appear in blue italic text.

To validate a solution

  1. On the Prompt Validation toolbar, click Do Validate Solution.
  2. In the Solution prompt validation window, select the page or function in the solution to validate. Prompt validation then validates the selected element and all its subordinate elements.

Prompt function script errors

Because the prompt engine runs each prompt function when validating a solution, script errors can trigger a run-time error message if Just-In-Time (JIT) debugging for scripts is enabled in Microsoft Visual Studio .NET 2003. JIT debugging for scripts is enabled in Visual Studio .NET 2003 by default.

Use the Visual Studio .NET 2003 JIT debugger to identify errors in the prompt function script. To use the JIT debugger, click Yes in the JIT run-time error message window. A second instance of Visual Studio .NET 2003 opens in debug mode and displays the first line of script that contains an error. For more information on JIT debugging, see the Visual Studio .NET 2003 documentation.

Clicking No in the JIT run-time error message window causes the prompt engine to stop validating the solution, leaving the script error in place.

See Also

Prompting the User | Creating Prompts | Prompts