Re: When using Ms Speech Engine Tapi CALLBACK stops receiving TAPI events!!!!



"Jack" <replyto@newsgroup> wrote in message
news:e784gWswFHA.2924@xxxxxxxxxxxxxxxxxxxxxxx
> Will, please read few posts before.

I have. All of them.

> Before, close to the beginning of that thread you stated you CAN receive
> Tapi messages DURING the play.

Yes. I can and I do. Even while VB6 applications are running in my server.

> Now, you say something different.

No. You don't understand and you don't listen.

> You contradict yourself.

Nope. The behavior you see is to be expected _if_ you proceed synchronously.
Do you know what that means?

To synchronously speak or stream means that the stretch of code that speaks
text or that streams a media file does nothing else but the speaking or the
streaming while either is ongoing. How can you possibly hope to receive a
notification in that case?

As Matthias and I have been trying to tell you THAT IS YOUR PROBLEM.

I said I can a do receive messages ( especially the all important state
messages that report disconnection ) because I do _nothing_ synchronously.
In other words, after commanding SAPI to speak or beginning an audio stream
my server runs code that listens for the next event.

Are you a VB "developer"? Are you familiar with the DoEvents method? Do you
know what happens if you fail to call it when you must in a windowed
application? When Windows messages /events fail to be processed the user
perceives the application as hung, yes?

The same is true here. The difference is that we are not discussing Windows
messages per se but rather TAPI, SAPI and waveform audio messages.

And just so there is no confusion, I am not saying that DoEvents is the fix.
I am saying that processing event notification while streaming or speaking
is ongoing is the fix. For the record, I don't know and don't care to know
how to make that fix in VB.

Finally, as you appear not to heed advice from Matthias or me, take a look
at this caution from the Simple Telephony sample of the Speech SDK

<quote>
// NOTE: The call-handling sequence in this application is
// short, so it is fine to make it all the way through to
// the end of the call even if the caller hung up in the
// middle. If your telephony app involves a lengthy
// call-handling sequence, you need a separate thread to
// listen for TAPI's CS_DISCONNECT message; otherwise your
// app will have no way of being notified of the hang-up,
// and your app will appear to have hung.
</quote>

You can look at the streaming of a media file or the synthesization of text
as one of the "lengthy call-handling sequence"s that the author is talking
about. You can take the delay in receiving the disconnect message as "appear
to have hung". The author of that caution is suggesting that handling events
in a background thread is the fix to the problem caused by applications that
use a naive single-threaded approach.

Regards,
Will




.



Relevant Pages

  • RE: XP - WMP 10 - Big Brother Problem (possible fix)
    ... Yet another fix that didnt work for me... ... > open WMP ... > Note this info is straight from the BB FAQ on streaming. ...
    (microsoft.public.windowsmedia.player)
  • Re: MP3 Player recommendations
    ... Subsonic is lightweight music/podcast streaming app. ... the developer developed a sister app to stream to an ... I don't know how well the Android app works as I don't have an Android ...
    (rec.music.gdead)
  • Re: having a problem playing streaming video
    ... That's really a problem Chris. ... you think anyone can help you fix a problem when you don't give the full ... "Need help with streaming, after sp2" <Need help with streaming, after ...
    (microsoft.public.windowsmedia.player)
  • Re: Anyone else having a few problems with MLB.tv?
    ... over the last few weeks and has been much more balky with its streaming ... classic games... ... I'm getting a little nervous that MLB is going ... FUBAR and apparently are trying to fix it. ...
    (rec.sport.baseball)
  • Re: having a problem playing streaming video
    ... worked fine until we loaded the sp2, ... I too would appreciate your help if you can fix this, thanks, mark cummins ... >> hi my name is keylo i'm having a problem playing streaming video from ... >> websites such as espn, cnn, etc. can you please tell me what wrong with my ...
    (microsoft.public.windowsmedia.player)

Quantcast