ISpeechRecoResult RecoContext Property

Microsoft Speech SDK

Intelligent Interface Technologies Home Page Microsoft Speech SDK

Speech Automation 5.1

Interface: ISpeechRecoResult

RecoContext Property

The RecoContext property retrieves the current ISpeechRecoContext for the recognizer.

Applications may have multiple recognition contexts open at the same time. RecoContext provides a means to determine which context owns the recognition. For example, in situations with more than recognition context, a recognition result may call RecoContext to get the context associated with it. The returned context may be changed afterward and will not affect other contexts.

Syntax

Set: (This property is read-only)
Get: ISpeechRecoContext = ISpeechRecoResult.RecoContext

Parts

ISpeechRecoResult
The owning object.
SpSharedRecoContext
Set: (This property is read-only)
Get: An SpSharedRecoContext variable that gets the property.

Example

The following snippet assumes a valid recognition RecoResult. If more than one recognition context exists, the one owning RecoResult is retrieved and the event interest is changed. No other recognition contexts are affected.

Dim myContext As ISpeechRecoContext

Set myContext = RecoResult.RecoContext()
myContext.EventInterests = SREFalseRecognition