StartPlayback on callback thread fails in .NET
Last reviewed: 11/6/2006
PRB Article ID: P110610
The information in this article applies to:
- SpeechKit 4
Results are unpredictable when invoking TTS or SR requests in HasEvent handlers in .NET .
Application callbacks are considered static unless they are via windows message (SetWindowMessage). They are performed synchronously on the speech event callback thread.
All callbacks are now fired asynchronously. In .NET, events are now dispatched to the application on separate threads like the Java component. In .NET, you must change your NChantSR and NChantTTS instantiation to include reference to the owner (parent) object to be able to access parent-owned objects and invoke NChantSR and NChantTTS methods:
NChantSR1 = new NChantSR(this); self.NChantSR1 := SpeechKit.NChantSR.Create(self); // Delphi .NET NChantTTS1 = new NChantSR(this); self.NChantTTS1 := SpeechKit.NChantTTS.Create(self); // Delphi .NET
Fixed in SpeechKit 4 build 188.8.131.52.
Component Formats Impacted
All component formats.