CHMlib Logo Leading Translation Management System for Translation Agencies, Top Translation Management Software for Freelance Translators, Time Tracking Software, Word Count, Character Count and Line Count Software, Computer Assisted Translation Tool for Easy Word Count, Clipboard Character Count Software, User-Friendly Translation Memory Software, Terminology Management Software, Terminology Management Server, Microsoft Glossary Software, Dictionary of Acronyms, Social Network for Translators and Translation Agencies, Acronyms and Abbreviations Search Engine, Russian Translation Lab, Ukrainian Translation Lab.
You are reading help file online using chmlib.com
CrisisHelper - First Aid in Tough Times of World Economic Crisis


Intelligent Interface Technologies Home Page Microsoft Speech SDK

Speech Automation 5.1

Interface: ISpeechRecoContext Events

Interference Event


The Interference event occurs when the speech recognition (SR) engine encounters interference in the input audio stream.

Interference may be caused by several factors of which six common ones are listed in the enumeration SpeechInterference. The Interference event indicates that the engine detected a condition which could prevent the optimal recognition process. Interference does not prevent the completion of the recognition. However, applications receiving this event may experience a lower quality recognition (the final text does not accurately reflect the spoken text) as the sound quality prevented a successful recognition.


SpeechRecoContext.Interference(
     StreamNumber As Long,
     StreamPosition As Variant,
     Interference As SpeechInterference
)

Parameters

StreamNumber
Specifies the stream number.
StreamPosition
Specifies the position within the stream.
Interference
A SpeechInterference constant that specifies the type of interference.

Example

The following Visual Basic form code demonstrates the use of the Interference event. The application displays the text of a successful recognition and also one of two common interferences results.

To run this code, create a form with the following controls:

  • Two labels called Label1 and Label2
  • Paste this code into the Declarations section of the form.

    The Form_Load procedure creates and activates a dictation grammar. The interference may be intentional caused by either making a sudden loud noise (such as a sharp increase of your voice or by clapping your hands near the microphone) or talking very quickly.

    Public WithEvents RC As SpSharedRecoContext
    Public myGrammar As ISpeechRecoGrammar
    
    Private Sub Form_Load()
        Set RC = New SpSharedRecoContext
        
        Set myGrammar = RC.CreateGrammar
        myGrammar.DictationSetState SGDSActive
    End Sub
    
    Private Sub RC_Interference(ByVal StreamNumber As Long, ByVal StreamPosition As Variant, ByVal Interference As SpeechLib.SpeechInterference)
        Select Case Interference
            Case SITooFast
                RC.Voice.Speak "Too fast. Speak more slowly."
            Case SITooLoud
                RC.Voice.Speak "Too loud. Speak softly."
                Label2.Caption = "SITooLoud detected at stream position: " & StreamPosition
        End Select
    End Sub
    
    Private Sub RC_Recognition(ByVal StreamNumber As Long, ByVal StreamPosition As Variant, ByVal RecognitionType As SpeechLib.SpeechRecognitionType, ByVal Result As SpeechLib.ISpeechRecoResult)
        Label1.Caption = Result.PhraseInfo.GetText
    End Sub
    


    You are reading help file online using chmlib.com

    If you want your help file to be removed or added please send e-mail to chmlibcom@gmail.com
    Partner sites: Logo Design, Simple Anti-Crisis Accounting Software, Voice Search for Web