Export (0) Print
Expand All

SpeechRecognizer.RecognizerResultReceived event

Published date: May 12, 2014

The RecognizerResultReceived event is raised when the SpeechRecognizer identifies a possible interpretation of user speech.

public event Windows.Foundation.TypedEventHandler<SpeechRecognizer,SpeechRecognitionResultReceivedEventArgs> RecognizerResultReceived

The RecognizerResultReceived event is raised once for each possible interpretation created during the Listening and Thinking phases of the current speech recognition session, with the SpeechRecognitionResultRecievedEventArgs.IsHypothesis property set to true. The event is then raised again at the end of the Thinking phase with IsHypothesis set to false.

The following event handler writes intermediate results to a TextBlock (XAML) or DIV (HTML) named IntermediateResults.

function SR_RecognizerResultReceived(args) {
    if (typeof (args.text) == "string") {
        document.getElementById("IntermediateResults").innerText = args.text;
When collecting speech results or intermediate results in a JavaScript application, quiet or unclear speech may cause this event to receive an error object in place of args.text. To maintain smooth program flow, verify that args.text is a string before attempting to read it. For more information, see How to: Add the Bing Speech Recognition Control to an application with a custom UI.

Minimum Supported Client

Windows 8

Required Extensions




© 2014 Microsoft