Possible Duplicate:
speech recognition from audio file instead of microphone
I have this program which does speech recognition using the microphone device. Here is a short snippet from the program that does so.
However, what I intend to do is instead of using the microsophone device, I intend to pass a sound file to this speech recognition engine, which in trun should recognize the text from that aduio file and retun the result.
SpeechRecognitionEngine speechRecognitionEngine = new SpeechRecognitionEngine();
List<Word> words = new List<Word>();
public TestSpeech()
{
speechRecognitionEngine = createSpeechEngine("en-us");
speechRecognitionEngine.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(engine_SpeechRecognized);
loadGrammarAndCommands();
speechRecognitionEngine.SetInputToDefaultAudioDevice();
speechRecognitionEngine.RecognizeAsync(RecognizeMode.Multiple);
}
What should I do instead of speechRecognitionEngine.SetInputToDefaultAudioDevice();
?
Speech to recognition desktop sample for recognition from audio device: http://www.codeproject.com/Articles/380027/Csharp-Speech-to-Text