Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Microsoft Speech Platform

ISpNotifyCallback

ISpNotifyCallback is a C++ virtual interface that can be implemented by a client application of the Speech Platform to receive notifications. Since it is not a COM interface, the application does not need to implement QueryInterface, AddRef, or Release. It is the responsibility of the client code to control the lifetime of an ISpNotifyCallback-style notification. To remove an installed notify callback, call ISpEventSource::SetNotifySink( NULL ). The final release of an object that supports ISpEventSource will automatically remove an installed notify callback.

The Speech Platform implementation uses a hidden window to call the client back on the same thread that was used to initialize the event source. Notification callbacks are the result of processing a window message. This means that when the notification mechanism is used:

  1. The NotifyCallback method will always be called on the thread that initialized the event source or notify translator object.
  2. The thread must have a window message pump.

Methods in Vtable Order

ISpNotifySource Methods Description
NotifyCallback Client implemented method is called by an object that supports ISpEventSource when an event occurs.