By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,012 Members | 1,235 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,012 IT Pros & Developers. It's quick & easy.

threading help!! c# and SAPI 5.1

P: n/a
I am trying to write a dll in C# using SAPI 5.1 SDK. The DLL is supposed to
take in a prerecorded WAV file and provide both the recognized text and a wav
file created from Text to speech on the result. I have all the functionality
working other then one minor yet bothersome problem.

I can not figure out how to get a result back from the Speech Recognition
engine without utilizing the recogniton event on the recoContext. Which
fires on free will once the engine has run through the stream. Is there a
way to do a WaitForRecognition on the engine like you can do for the
Text-To-Speech like...

SpVoice speech = new SpVoice();
speech.WaitUntilDone(System.Threading.Timeout.Infi nite);

Or is there a way to use an AutoEventReset or Mutex to signal the
completion. It seems that the recognition event always runs on the same
thread as the original recoContext so i can't tell that thread to wait or
sleep or the recognition will never hit. And if I try to put the Speech
recognition code in its own thread the recognition event gets lost.

Am I missing something or is there functionality in c# or SAPI to get around
this?

THANK YOU SO MUCH FOR ANY HELP!!

-Andy
Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.