ISpNotifySource (Windows CE 5.0)
This interface allows the application to configure the events that trigger notifications. 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 interface.
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.
Both variations of callbacks as well as the window message notification require a window message pump to run on the thread that initialized the notify source. Callback is only called as the result of window message processing, and is always called on the same thread that initialized the notify source.
When to Implement
The following list shows what entities implement this interface.
- SpRecoContext
- SpSharedRecoContext
- SpVoice
- SpMMAudioIn
- SpMMAudioOut
- SpStreamFormatConverter
Methods
The following table lists the methods for the ISpNotifySource interface.
Method | Description |
---|---|
GetNotifyEventHandle | Gets Win32 event handle associated with this notify source. |
SetNotifyCallbackFunction | Sets a callback function to receive notifications. |
SetNotifyCallbackInterface | Sets an object derived from ISpTask to receive notifications. |
SetNotifySink | Sets up the instance to make free-threaded calls through ISpNotifySink::Notify. THis method can also be used to unregister an existing notification. |
SetNotifyWindowMessage | Sets a window handle to receive notifications as window messages. |
SetNotifyWin32Event | Sets up a Win32 event object to be used by this instance for notifications. |
WaitForNotifyEvent | A blocking call that waits for a notification. |
Requirements
OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.
See Also
Send Feedback on this topic to the authors