SpeechRecognizer CreateRecoContext Method

Microsoft Speech SDK

Intelligent Interface Technologies Home Page Microsoft Speech SDK

Speech Automation 5.1

Interface: ISpeechRecognizer

CreateRecoContext Method


The CreateRecoContext method creates a recognition context object from the recognizer.


SpeechRecognizer.CreateRecoContext() As ISpeechRecoContext

Parameters

None.

Return Value

The CreateRecoContext method returns an ISpeechRecoContext object.


Example

The following Visual Basic form code demonstrates the use of CreateRecoContext.

To run this code, create a form without any controls. Copy this code and paste it into the Declarations section of the form.

Private Sub Form_Load()
    Dim SharedRecognizer As SpSharedRecognizer
    Set SharedRecognizer = CreateObject("SAPI.SpSharedRecognizer")
    
    Dim myContext As Object
    Set myContext = SharedRecognizer.CreateRecoContext
End Sub