This topic has not yet been rated - Rate this topic

SpeechRecognizerUI.RecognizeWithUIAsync method

Applies to Windows Phone only

Begins a speech recognition session for a SpeechRecognizerUI object.

Syntax


public IAsyncOperation<SpeechRecognitionUIResult> RecognizeWithUIAsync()

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<SpeechRecognitionUIResult>

The result of the speech recognition session that was initiated by the SpeechRecognizerUI object.

Remarks

For more information about how to use the RecognizeWithUIAsync method, see Starting speech recognition for Windows Phone.

Only one SpeechRecognizerUI instance can actively perform speech recognition at a time. This means that if you’ve instantiated two instances of the SpeechRecognizerUI class and one of the instances is performing speech recognition, you should wait until the RecognizeWithUIAsync method completes before attempting speech recognition with the other instance.

Multiple concurrent RecognizeWithUIAsync calls on the same speech recognizer object raises an InvalidOperationException. In addition, calling serially may also result in an exception if the existing running RecognizeWithUIAsync call is not in a final state such as error, cancelled, or completed. To avoid this problem, use the await keyword with this method and do not attempt another speech recognition attempt until the first attempt completes.

If the speech recognizer uses a developer-authored grammar, there is no limit on the audio length of the speech recognition attempt. However, if the speech recognizer uses a pre-defined grammar type, the maximum audio length is approximately 10 seconds. The SPERR_AUDIO_LIMIT_EXCEEDED error returns in cases where the audio length is longer than the maximum value.

Requirements

Minimum supported client

None supported

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8

End of phone support

Windows Phone 8.1 [Windows Phone Silverlight 8.1 apps only]

Namespace

Windows.Phone.Speech.Recognition
Windows::Phone::Speech::Recognition [C++]

Metadata

Windows.winmd

Capabilities

ID_CAP_SPEECH_RECOGNITION [Windows Phone]
ID_CAP_MICROPHONE [Windows Phone]
ID_CAP_NETWORKING [Windows Phone]

See also

SpeechRecognizerUI

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.