S
spacedog
hi, i'm having a problem using C#'s lock and windows2000's text to
speech (vtext.dll) ... basically it looks like the callback from the
TTS is violating C#'s lock, which looks very very suspicious. here are
the particulars:
i've made a form that has two buttons, one to "start speaking" and one
to "cancel speaking", and i've registered the TTS's callback message
"speech_recognized" to call my method axTextToSpeech1_SpeakingDone.
each of the methods, button1_Click (i.e. start speaking),
button2_Click (cancel speaking), and axTextToSpeech1_SpeakingDone call
handleEvent(string msg), with msg being just the name of the callback
(e.g. button1_Click).
handleEvent has a lock covering the whole method, and within that a
case statement.
if msg == "button1_Click", just calls the axTextToSpeech1.Speak
if msg == "button2_Click", just calls axTextToSpeech1.StopSpeaking
if msg == "axTextToSpeech1_SpeakingDone", just prints a message.
i've put in log messages both to std out and to file, and it seems
pretty clear that if you press the start speaking and then cancel it
while it's still speaking, the "axTextToSpeech1_SpeakingDone" method
gets called and start going through handleEvent, *even though the
cancel msg is still going through the locked code* ...
has anyone noticed anything like this before?? is it just some weird
anomaly w/ this TTS? if so, is there some other TTS i can drop into my
GUI? i've tried to download a couple of others, but couldn't get them
to work.
thanks in advance.
speech (vtext.dll) ... basically it looks like the callback from the
TTS is violating C#'s lock, which looks very very suspicious. here are
the particulars:
i've made a form that has two buttons, one to "start speaking" and one
to "cancel speaking", and i've registered the TTS's callback message
"speech_recognized" to call my method axTextToSpeech1_SpeakingDone.
each of the methods, button1_Click (i.e. start speaking),
button2_Click (cancel speaking), and axTextToSpeech1_SpeakingDone call
handleEvent(string msg), with msg being just the name of the callback
(e.g. button1_Click).
handleEvent has a lock covering the whole method, and within that a
case statement.
if msg == "button1_Click", just calls the axTextToSpeech1.Speak
if msg == "button2_Click", just calls axTextToSpeech1.StopSpeaking
if msg == "axTextToSpeech1_SpeakingDone", just prints a message.
i've put in log messages both to std out and to file, and it seems
pretty clear that if you press the start speaking and then cancel it
while it's still speaking, the "axTextToSpeech1_SpeakingDone" method
gets called and start going through handleEvent, *even though the
cancel msg is still going through the locked code* ...
has anyone noticed anything like this before?? is it just some weird
anomaly w/ this TTS? if so, is there some other TTS i can drop into my
GUI? i've tried to download a couple of others, but couldn't get them
to work.
thanks in advance.