First, something or somebody fooled you about the "annoying recognition window". Speech recognition does not require any windows at all. You probably worked with some stupid application, not with recognition engine itself.
The second part of the question is quite correct. You really need to supply some distinct words or phrases, to have acceptable recognition accuracy. This set of phrases is called
grammar, usually created using the class
System.Speech.Recognition.GrammarBuilder
. Please see:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.grammar[
^],
http://msdn.microsoft.com/en-us/library/system.speech.recognition.grammarbuilder[
^].
You build a grammar using the grammar builder based on the instance of the class
Choices
:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.choices.aspx[
^].
The purpose of it is to provide one set of choices as a constraint to an instance of the grammar used at the current moment of time. See the code sample in the article referenced above.
Basically, all you need to use the speech recognition engine can be found if you reference "Speech.dll". (This library is bundled with .NET Framework and put in GAC, so you add the reference using the tab ".NET" of the "Add Reference" window in Visual Studio.) Please see the namespace
System.Speech.Recognition
:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.aspx[
^].
The central point of this API is the class
System.Speech.Recognition.SpeechRecognizer
or
System.Speech.Recognition.SpeechRecognitionEngine
. You can choose one of them based on your requirement and application type.
Please see:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrecognizer.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrecognitionengine.aspx[
^].
The code sample are available on each of these classes. (No window of form is required :-).)
—SA