Well, you can try what the Microsoft Speech recognition engine could do about that using
System.Speech.Recognition.SpeechRecognitionEngine
.
Yes, dictating lengthy sentence is quite different from command recognition. The key difference is using the
DictationGrammar
. Try it with console application. Here is the application entry point:
using System.Speech.Recognition;
[System.MTAThread]
static void Main() {
SpeechRecognitionEngine recognizer = new SpeechRecognitionEngine();
Grammar dictationGrammar = new DictationGrammar();
recognizer.LoadGrammar(dictationGrammar);
try {
System.Console.WriteLine("Start talking!");
recognizer.SetInputToDefaultAudioDevice();
RecognitionResult result = recognizer.Recognize();
System.Console.WriteLine(result.Text);
} catch (InvalidOperationException exception) {
System.Console.WriteLine(
String.Format(
"Could not recognize input; {0}: '{1}'.",
exception.GetType(), exception.Message));
} finally {
recognizer.UnloadAllGrammars();
}
System.Console.WriteLine("Done. Press any key...");
System.Console.ReadKey(true);
}
While the recognition with command-based grammar works amazingly well, you may find dictation results frustrating…
Not my fault. :-)
—SA