Share via


Responding to Silence and Unrecognized Input

  Microsoft Speech Technologies Homepage

(Dialog Speech Control Sample)

This sample begins by playing the initial prompt, "Please select black or white." If the user remains silent, or if the user mumbles more than three times in a row, the application prompts the user to try again later, and the application stops running. When the user responds, saying either black or white, the application prompts the user with thanks for answering the question and then stops running.

This sample illustrates:

  • The selection of the appropriate prompt in response to repeated user mumble (defined as the user saying something that the system does not understand), or user silence.
  • The use of an author-defined exception, plus scripting to place a limit on the allowable number of consecutive occurrences of user mumbles or silences. (The sample stops running after more than three silences or mumbles or a combination of both in a row.)
  • The use of a prompt function to encapsulate the logic required to select the appropriate prompt given the user's response.
  • Using a prompt function instead of inline prompt text.
  • Using event handlers for user silence and user mumble together with script to generate an author-defined exception.
  • Client-side variable persistence across postback using the ClientViewState object and the SpeechCommon.SetViewState and SpeechCommon.GetViewState methods.
  • BargeIn (the ability of the user to interrupt the prompt with a response).

Running the Sample

Open the sample, and then either remain silent, or say something other than black or white more than three times in a row. Responses other than black or white occasionally may be recognized as either black or white, rather than as a mumble.

The application responds to user input with appropriate output prompts. When the application does not recognize user input speech, it replies, "I'm sorry, I didn't understand that," or when the system detects no user input speech, it replies, "I'm sorry, I didn't hear you." The content of the application's responses varies throughout multiple occurrences of mumble or silence. After more than three consecutive occurrences of mumble or silence, the sample prompts the user to call back later.

Remarks

This sample does not support:

  • Global commands such as "Help," "Repeat," or "Main Menu."
  • Confirmation of the user's response.

See Also

Dialog Speech Controls Overview | SemanticMap Control | Babbletimeout Property | Initialtimeout Property | InlinePrompt Property | PromptSelectFunction Property | ClientViewState | Additional Client Scripting Elements

Creating Prompt Functions | Recognition Mode: Multiple Example | Voice-only Run-time Behavior