Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SpeechRecognizerUI.RecognizeWithUIAsync method

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

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

 

 

Community Additions

Show:
© 2015 Microsoft