Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wav to text assistance

Status
Not open for further replies.

Trebor100

Programmer
Mar 14, 2006
90
GB
Afternoon all,

I've just started playing with SAPI - i've got the text to wav working fine however I'm trying to get a wav to text converter written also. I've got a problem whereby the recognition event isnt fired in the code below:

wavfile = "c:/ccs_audio/111.wav";
wavrecocontext = new SpeechLib.SpInProcRecoContext();
((SpInProcRecoContext)wavrecocontext).Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(wavrecocontext_Recognition);
((SpInProcRecoContext)wavrecocontext).EndStream += new _ISpeechRecoContextEvents_EndStreamEventHandler(wavrecocontext_EndStream);
grammar = wavrecocontext.CreateGrammar(2);
grammar.DictationLoad("", SpeechLoadOption.SLOStatic);
inputwav = new SpFileStream();
inputwav.Open(@wavfile, SpeechStreamFileMode.SSFMOpenForRead, false);
wavrecocontext.Recognizer.AudioInputStream = inputwav;
grammar.DictationSetState(SpeechRuleState.SGDSActive);

Any thoughts?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top