SpeechRecoContext Recognizer Property

Microsoft Speech SDK

Intelligent Interface Technologies Home Page Microsoft Speech SDK

Speech Automation 5.1

Interface: ISpeechRecoContext

Recognizer Property


The Recognizer property identifies the recognizer associated with the recognition context.

Syntax

Set: (This property is read-only)
Get: ISpeechRecognizer = SpeechRecoContext.Recognizer

Parts

SpeechRecoContext
The owning object.
SpeechRecognizer
Set: (This property is read-only)
Get: A SpeechRecognizer object that gets the value of the property.

Remarks

Though it is usually acceptable to declare an object with the exact class name, ISpeechRecognizer is most often implemented as either SpSharedRecognizer or SpInprocRecognizer. Since it is not always known ahead of time which type of recognizer will be used, it is safer to declare the object as Object.

Example

The following code snippets demonstrates retrieving the recognizer associated with recognition context. The first example is a shared recognizer.

Public WithEvents RecognitionContext As SpSharedRecoContext

Set RecognitionContext = New SpSharedRecoContext            
Dim theRecognizer As Object
Set theRecognizer = RecognitionContext.Recognizer

The second example is an InProc recognizer.

Public WithEvents RecognitionContext As SpInprocRecoContext

Set RecognitionContext = New SpInprocRecoContext            
Dim theRecognizer As Object
Set theRecognizer = RecognitionContext.Recognizer