Windows apps
Collapse the table of content
Expand the table of content
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::LoadGrammarAsync Method (Grammar^)

 

Asynchronously loads a speech recognition grammar.

Namespace:   System.Speech.Recognition
Assembly:  System.Speech (in System.Speech.dll)

public:
void LoadGrammarAsync(
	Grammar^ grammar
)

Parameters

grammar
Type: System.Speech.Recognition::Grammar^

The speech recognition grammar to load.

When the recognizer completes this asynchronous operation, it raises a LoadGrammarCompleted event. The recognizer throws an exception if the speech recognition grammar is already loaded, is being asynchronously loaded, or has failed to load into any recognizer. If the recognizer is running, applications must use RequestRecognizerUpdate to pause the speech recognition engine before loading, unloading, enabling, or disabling a grammar.

To load a speech recognition grammar synchronously, use the LoadGrammar method.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft