Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ISpNotifySource (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

ISpNotifySource

In both speech synthesis and speech recognition, applications receive notifications when words have been spoken or when phrases have been recognized. SAPI components that generate notifications implement an ISpNotifySource.

The ISpNotifySource and ISpNotifySink interfaces alone only provide a mechanism for a notification but no information on the events that caused the notification. With an ISpEventSource object, an application can retrieve information about the events that caused the notification.

Applications will not typically use the free-threaded ISpNotifySink mechanism for receiving SAPI event notifications. They will use one of the simplified methods of either a window message, callback or Win32 event.

Note that both variations of callbacks as well as the window message notification require a window message pump to run on the thread that initialized the notification source. Callback will only be called as the result of window message processing, and will always be called on the same thread that initialized the notify source. However, using Win32 events for SAPI event notification does not require a window message pump.

Implemented By

Methods in Vtable Order

ISpNotifySource MethodsDescription
SetNotifySinkSets up the instance to make free-threaded calls through ISpNotifySink::Notify.  This method can also be used to unregister an existing notification.
SetNotifyWindowMessageSets a window handle to receive notifications as window messages.
SetNotifyCallbackFunctionSets a callback function to receive notifications.
SetNotifyCallbackInterfaceSets an object derived from ISpTask to receive notifications.
SetNotifyWin32EventSets up a Win32 event object to be used by this instance for notifications.
WaitForNotifyEventA blocking call which waits for a notification.
GetNotifyEventHandleRetrieves Win32 event handle associated with this notify source.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.