Share via


Playing a Prompt across Page Transitions

  Microsoft Speech Technologies Homepage

(Dialog Speech Control Sample)

This sample illustrates using the PromptQueue SALT interpreter object to play an asynchronous prompt. In this sample, the prompt is used as a transitional prompt, and is played asynchronously with the transition from the first .aspx page to the second .aspx page of the sample.

A transitional prompt can be a piece of music or a sound that indicates that time is passing, and is useful for minimizing user-perceived latencies. A transitional prompt is the audio equivalent of the hourglass cursor in a graphical user interface (GUI).

The first .aspx page contains a prompt-only QA that plays the following text-to-speech (TTS) message:

You are about to hear a prompt that counts from one up to ten. This prompt will be played asynchronously with the page transfer. The amount of the prompt that you will hear depends on the length of time taken to do the page transfer. Here is the prompt.

While still on page 1, the sample creates a PromptQueue SALT interpreter object, places the prompt that counts from one to ten into the object, and begins playing the prompt. The sample then opens the second .aspx page. When the second page opens, the counting prompt stops, and the following TTS prompt is played:

"The page load is complete and the counting prompt has been stopped. End of sample."

  • Creating a PromptQueue SALT interpreter object
  • Using a prompt during a page transition

Running the Sample

Open the sample. After the introductory prompt is finished, listen to the counting prompt and observe how much of the counting prompt is played before the completion of the page transition ends the play.

Remarks

  • The actual latency of transition from page 1 to page 2 depends upon specific computer configuration, connection speed, and other similar factors.
  • Application developers can set the queued prompt so that the counting does not immediately stop when the transition to page 2 is complete.

See Also

Dialog Speech Controls Overview | PromptQueue Object