Share via


ISpSREngine (SAPI 5.3)

Microsoft Speech API 5.3

ISpSREngine

This is the main interface that engine developers must implement to have a working SAPI SR engine. Engine vendors need to implement this interface in an InProc COM object with the threading model "Both". This object can also implement the ISpObjectWithToken interface. SR engines may also have additional objects implementing ISpTokenUI, ISpSRAlternates, and a custom engine-extension object.

The SR Engine Guide describes in detail how an SR engine interacts with SAPI and how the methods of this interface are implemented.

Applications do not directly call the methods on this interface, all calls are made by SAPI.

Implemented By
  • SR engine developers as the main interface between their SR engine and SAPI.
How Created
  • Only SAPI will directly create this object. When an application creates a RecoContext object, either shared or InProc, then SAPI will find the appropriate recognizer object token and create the object implementing this interface from the CLSID in the object token.

Methods in Vtable Order

ISpSREngine Methods
SetSite
GetInputAudioFormat
RecognizeStream
SetRecoProfile
OnCreateGrammar
OnDeleteGrammar
LoadProprietaryGrammar
UnloadProprietaryGrammar
SetProprietaryRuleState
SetProprietaryRuleIdState
LoadSLM
UnloadSLM
SetSLMState
SetWordSequenceData
SetTextSelection
IsPronounceable
OnCreateRecoContext
OnDeleteRecoContext
PrivateCall
SetAdaptationData
SetPropertyNum
GetPropertyNum
SetPropertyString
GetPropertyString
SetGrammarState
WordNotify
RuleNotify
PrivateCallEx
SetContextState