Share via


ISpSREngine (Windows Embedded CE 6.0)

1/6/2010

This interface defines an SR engine. It is the main interface that the engine developer must use in constructing a working SR engine. Only SAPI makes direct calls to this interface.

Applications can access this interface only indirectly. An application must create an object implementing ISpRecoContext. Then SAPI can find the appropriate recognizer object token and create the object implementing ISpSREngine from the CLSID in the object token.

When to Implement

SR engines must implement this interface to allow interactions with SAPI.

Methods

The following table shows the methods for the ISpSREngine interface.

Method Description

GetInputAudioFormat

Gets the audio formats that the SR engine supports and indicates if the engine can support a particular format.

GetPropertyNum

Gets a numerical property from the SR engine.

GetPropertyString

Gets a property string from the SR engine.

IsPronounceable

Determines if the SR engine can recognize a word.

LoadProprietaryGrammar

Loads a grammar in an engine-specific format.

LoadSLM

Loads a statistical language model (SLM) for dictation.

OnCreateGrammar

Informs the SR engine of the creation of a grammar.

OnCreateRecoContext

Informs the SR engine of the creation of a recognition context.

OnDeleteGrammar

Informs the SR engine of the deletion of a grammar

OnDeleteRecoContext

Informs the SR engine that a recognition context is being destroyed.

PrivateCall

Handles an engine extension call to the SR engine.

PrivateCallEx

Handles an engine extension call to the SR engine when a data block of variable size is requested in the call.

RecognizeStream

Begins recognition processing on a stream.

RuleNotify

Notifies the SR engine of the rule information in context-free grammars (CFGs).

SetAdaptationData

Provides text data for language model adaptation to the engine.

SetContextState

Informs the engine if a recognition context has been activated or deactivated.

SetGrammarState

Informs the engine if a grammar has been activated or deactivated.

SetPropertyNum

Sets a numerical property attribute on the SR engine.

SetPropertyString

Sets a property string for the SR engine.

SetProprietaryRuleIdState

Sets the proprietary grammar rule identifier state.

SetProprietaryRuleState

Sets the proprietary grammar rule state.

SetRecoProfile

Informs the engine of the current recognition profile token.

SetSite

Sets the engine site for the SR engine to use.

SetSLMState

Sets the recognition state of the SLM to active or inactive.

SetTextSelection

Informs the engine of the displayed and selected areas of the text buffer.

SetWordSequenceData

Sets the text buffer information.

UnloadProprietaryGrammar

Instructs the engine to unload an engine specific grammar.

UnloadSLM

Instructs the engine to unload an SLM.

WordNotify

Notifies the SR engine of the words in a CFG.

Remarks

An SR engine must implement this interface in an in-process (InProc) recognition COM object, with the threading model "Both". The engine can also implement the ISpObjectWithToken interface. The engine can have additional objects implementing ISpTokenUI, ISpSRAlternates, and a custom engine extension object.

Requirements

Header sapiddk.h, sapiddk.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

SAPI Interfaces