Convert Audio File to text using System.Speech

Posted by Kushal Kalambi on Stack Overflow See other posts from Stack Overflow or by Kushal Kalambi
Published on 2011-05-10T07:27:23Z Indexed on 2012/09/27 15:37 UTC
Read the original article Hit count: 270

I am looking to convert a .wav file recorded through an android phone at 16000 to text using C#; namely the System.Speech namespace. My code is mentioned below;

recognizer.SetInputToWaveFile(Server.MapPath("~/spoken.wav"));
recognizer.LoadGrammar(new DictationGrammar());
RecognitionResult result = recognizer.Recognize();
label1.Text = result.Text;

The is working perfectly with sample .wav "Hello world" file. However when i record something on teh phone and try to convert to on the pc, the converted text is no where close to what i had recoreded. Is there some way to make sure the audio file is transcribed accurately?

© Stack Overflow or respective owner

Related posts about c#

Related posts about speech-recognition