SpeechRecognitionEngine class to recognize speech
suggest changeVersions
SpeechRecognitionEngine is in System.Speech and is covered here for .NET Framework 3.0 through 4.6.2.
Syntax
- SpeechRecognitionEngine()
- SpeechRecognitionEngine.LoadGrammar(Grammar grammar)
- SpeechRecognitionEngine.SetInputToDefaultAudioDevice()
- SpeechRecognitionEngine.RecognizeAsync(RecognizeMode mode)
- GrammarBuilder()
- GrammarBuilder.Append(Choices choices)
- Choices(params string[] choices)
- Grammar(GrammarBuilder builder)
Parameters
LoadGrammar
| Parameter | Details |
|---|---|
| grammar | The grammar to load. For example, a DictationGrammar object to allow free text dictation. |
RecognizeAsync
| Parameter | Details |
|---|---|
| mode | The RecognizeMode for the current recognition: Single for one recognition, Multiple to allow more than one. |
GrammarBuilder.Append
| Parameter | Details |
|---|---|
| choices | Appends choices to the grammar builder. When the user speaks, the recognizer can follow different branches of the grammar. |
Choices constructor
| Parameter | Details |
|---|---|
| choices | An array of choices for the grammar builder. See GrammarBuilder.Append. |
Grammar constructor
| Parameter | Details |
|---|---|
| builder | The GrammarBuilder used to construct a Grammar. |
Remarks
To use SpeechRecognitionEngine, your Windows version needs to have speech recognition enabled.
You have to add a reference to System.Speech.dll before you can use the speech classes.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents