This topic has not yet been rated - Rate this topic

SpeechRecognizer.PreloadGrammarsAsync method

4/5/2013

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

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

 

 

Build date: 4/5/2013

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.