471,624 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

threading help!! c# and SAPI 5.1

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
0 1213

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by trialproduct2004 | last post: by
2 posts views Thread by trialproduct2004 | last post: by
reply views Thread by OpticTygre | last post: by
3 posts views Thread by Keith Mills | last post: by
2 posts views Thread by trialproduct2004 | last post: by
reply views Thread by AndyNY | last post: by
3 posts views Thread by teillon | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.