Speech Automation 5.1
Interface: ISpeechRecoContext
AudioInputInterferenceStatus Property
The AudioInputInterferenceStatus property returns information about interference with the audio input of the recognition context.
This information is usually returned by the ISpeechRecoContext Interference event.
Syntax
Set: | (This property is read-only) |
Get: | SpeechInterference = SpeechRecoContext.AudioInputInterferenceStatus |
Parts
- SpeechRecoContext
- The owning object.
- SpeechInterference
-
Set: (This property is read-only)
Get: A SpeechInterference constant reflecting the interference type.
Example
The following code snippet demonstrates retrieving the interference status for the last recognition. It assumes a valid RecognitionContext and speech recognition code in place.
Public WithEvents RecognitionContext As SpSharedRecoContext
'Speech processing code here
Dim interference As SpeechInterference
interference = RecognitionContext.AudioInputInterferenceStatus
A more realistic example returns the Interference event. In this example, the event displays a message in the Label1 label item of the application's Form1.
Private Sub RC_Interference(ByVal StreamNumber As Long, ByVal StreamPosition As Variant, ByVal interference As SpeechLib.SpeechInterference)
Form1.Label1.Caption = "Interference detected: " & interference
End Sub