How do you use the .NET speech namespace classes to convert audio in a WAV file to textual form which I can display on the screen or save to file?
I am looking for some
I realize this is an old question, but there is better information available in later questions and answers. For example see What is the best option for transcribing speech-to-text in a asp.net web app?
Instead of calling SetInputToDefaultAudioDevice() you can call SetInputToWaveFile() to read from an audio file.
The desktop recognition engine that comes in Windows Vista and Windows 7 includes a dictation grammar as shown in the referenced answer.
The classes in System.Speech are for text to speech (primarily an acessibility feature).
You are looking for voice recognition. There is the System.Speech.Recognition namespace available since .Net 3.0. It uses the Windows Desktop Speech engine. This might get you started, but I guess there are better engines out there.
Voice recognition is very complicated and hard to do right, there are also some commercial products available.
You should use the SpeechRecognitionEngine. To use a wave file, call SetInputToWaveFile. I wish I could help you more, but I'm no expert.
Oh, and if your word is really triskaidekaphobia
, I don't think even a human speech recognition engine would recognize that...
You actually need Natural Language toolkit. In python I have used NTLK http://www.nltk.org/
In .Net I have just found Antelope https://stackoverflow.com/questions/1762040/natural-language-toolkit-equivalent-in-c
see the article as well http://en.wikipedia.org/wiki/Speech_recognition
I have tested your code , but it is not grabbing wave file properly. It is catching
If Not OpenFileDialog1.FileName.Contains("wav") Then MessageBox.Show("Incorrect file") Else TextBox1.Text = OpenFileDialog1.FileName End If
Not the else condition. I tried using .wav in the string also.
I am also in need of a sample code for transcribing wav file to text not from Microphone. Please if u came to a good solution so please post it here.