Export (0) Print
Expand All

ISpSREngine (SAPI 5.3)

Speech API 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 MethodsDescription
SetSiteSets the ISpSREngineSite interface for the engine to use.
GetInputAudioFormatGets the audio format that the SR engine supports.
RecognizeStreamBegins recognition processing on a stream.
SetRecoProfilePasses the current active user profile to the engine.
OnCreateGrammarCreates a new recognition grammar.
OnDeleteGrammarInforms the engine of the deletion of a grammar.
LoadProprietaryGrammarInstructs the engine to load a grammar in an engine-specific format.
UnloadProprietaryGrammarUnloads an engine-specific grammar.
SetProprietaryRuleStateSets the proprietary grammar rule state.
SetProprietaryRuleIdStateSets the proprietary grammar rule ID state.
LoadSLMInstructs the engine to load a dictation statistical language model (SLM).
UnloadSLMInstructs the engine to unload an SLM.
SetSLMStateSets the recognition state of the SLM to active or inactive.
SetWordSequenceDataSets the text buffer information.
SetTextSelectionInforms the engine of the displayed and selected areas of the text buffer.
IsPronounceableDetermines if a word can be recognized by the engine.
OnCreateRecoContextInforms the engine of the creation of a recognition context.
OnDeleteRecoContextNotifies the engine that a recognition context is being destroyed.
PrivateCallEngine-specific call to the engine.
SetAdaptationDataProvides text data for language model adaptation to the engine.
SetPropertyNumSets a numerical property attribute on the SR engine.
GetPropertyNumRetrieves a numerical property attribute from the SR engine.
SetPropertyStringSets a text property attribute on the SR engine.
GetPropertyStringRetrieves a text property attribute from the SR engine.
SetGrammarStateInforms the engine if a grammar has been activated or deactivated.
WordNotifyNotifies the SR engine of the words in CFG grammars.
RuleNotifyNotifies the SR engine of the rule information in CFG grammars.
PrivateCallExCalls the engine which allows a variable sized data block can be returned from the engine to the engine extension object..
SetContextStateIndicates that a recognition context has been deactivated or activated.
Show:
© 2014 Microsoft