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.

SpeechRecognizer.PreloadGrammarsAsync method

Applies to Windows Phone only

Loads all grammars in the speech grammar set.

Syntax


public IAsyncAction PreloadGrammarsAsync()

Parameters

This method has no parameters.

Return value

Type: IAsyncAction

The result of the asynchronous action.

Remarks

For speech recognition to work with custom grammars, each grammar must be added, loaded, and used by the RecognizeAsync method. AddGrammarFromList, AddGrammarFromUri and AddGrammarFromPredefinedType add a grammar to an internal queue, but the grammars are not yet in a loaded state. Grammars are loaded in one of two ways: you can call PreloadGrammarsAsync prior to calling RecognizeAsync, or you can skip calling PreloadGrammarsAsync and RecognizeAsync will call it for you. The same delay occurs in both cases, but leaving the burden to RecognizeAsync means that the delay will occur when a user attempts speech recognition, and there is a higher chance they will notice the delay. For this reason, unless you have only a few simple grammars, you may wish to call this method.

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

SpeechRecognizer

 

 

Community Additions

Show:
© 2014 Microsoft