ISpRecoContext (Windows Embedded CE 6.0)
1/6/2010
This interface enables applications to create different functional views or contexts of the SR engine. It inherits from ISpEventSource.
Each object implementing this interface can take interest in different speech recognition events, defined by ISpEventSource and use different recognition grammars, defined by ISpRecoGrammar.
When to Implement
The following class IDs (CLSID) can be used with this interface. A complete CLSID listing for all interfaces is in the SAPI Class IDs section.
- CLSID_SpSharedRecoContext
When to Use
An application must have at least one object implementing ISpRecoContext to receive recognitions. It can create multiple speech recognition context objects to handle different recognition types. For example, a multiple document interface (MDI) application can associate a different context object with each document pane to localize grammar and support event processing.
The application creates a new ISpRecoContext object by calling ISpRecognizer::CreateRecoContext. If the application needs to use a shared recognizer (ISpRecognizer), it can create a shared speech recognition context by calling CoCreateInstance with CLSID_SpSharedRecoContext.
Methods
The following table shows the methods for the ISpRecoContext interface.
Methods | Description |
---|---|
Sets a bookmark within the current recognition stream. |
|
Creates a grammar. |
|
Creates a new result from a serialized result. |
|
Gets audio options for a given stream. |
|
Gets the state of the speech recognition context. |
|
Gets the maximum number of alternates that the SR engine will retrieve for command and control or proprietary grammars associated with the speech recognition context. |
|
Gets a reference to the current recognizer object associated with the speech recognition context. |
|
Gets status information about the speech recognition context. |
|
Gets a reference to the voice associated with the speech recognition context. |
|
Gets SR engine events that stop audio output, and purges the current speaking queue. |
|
Pauses the recognition process to allow SR engine synchronization. |
|
Resumes the SR engine from the paused state and restarts the recognition process. |
|
Sends data to the SR engine to update the current language model. |
|
Sets the audio options for results from the speech recognition context. |
|
Sets the state of the recognition context. |
|
Sets the maximum number of alternates retrieved for command and control grammars. |
|
Sets the voice associated with the speech recognition context. |
|
Sets SR engine events that stop audio output, and purges the current speaking queue. |
Requirements
Header | sapi.h, sapi.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |