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: ISpeechRecognizer

DisplayUI Method


The DisplayUI method initiates the display of the specified UI.

The speech recognition (SR) and text-to-speech (TTS) engines are capable of displaying and running various user interfaces (UI). These displays assist with different aspects of the speech environment:

  • User training
  • Microphone training wizards
  • Adding and removing words
  • Setting controls for the engine
  • Many of these UIs are available using Speech properties in Control Panel. In addition, engines are capable of requesting specific UIs be run to improve a situation. For example, the SR could request more user training if the recognitions are consistently poor.

    Engines are not required to support UIs and not all engines will have the same UIs. Consult the manufacturer's engine documentation for specific details. An application may call ISpeechRecognizer.IsUISupported before attempting to invoke a particular UI to see if the engine supports it. Invoking unsupported UIs will cause a run-time error. If the UI is available, use ISpeechRecognizer.DisplayUI to invoke the display.


    SpeechRecognizer.DisplayUI(
         hWndParent As Long,
         Title As String,
         TypeOfUI As String,
         [ExtraData As Variant = Nothing]
    )
    

    Parameters

    hWndParent
    Specifies the window handle of the owning window.
    Title
    Specifies the caption used for the UI window.
    TypeOfUI
    A String specifying the name of the UI to display. For a list of available SAPI 5 UI, see Engine User Interfaces.
    ExtraData
    [Optional] Specifies the ExtraData. This information is unique to the application and may be used to provide additional or more specific information to the UI. By default, the Nothing value is used and indicates the UI does not use any additional information provided by this method.

    Return Value

    None.


    Remarks

    See ISpeechRecognizer.IsUISupported and ISpeechRecoContext.RequestUI for additional information.

    Example

    The following Visual Basic form code demonstrates the use of the DisplayUI event. The application runs the training wizard, the same one available using Speech properties in Control Panel.

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

  • A command button called Command1
  • Paste this code into the Declarations section of the form.

    Public WithEvents RC As SpSharedRecoContext
    Public myGrammar As ISpeechRecoGrammar
    
    Private Sub Command1_Click()
        Dim theRecognitizer As ISpeechRecognizer
        Set theRecognizer = RC.Recognizer
        
        theRecognizer.DisplayUI Form1.hWnd, "My App's Additional Training", SpeechUserTraining, vbNullString
    End Sub
    
    Private Sub Form_Load()
        Set RC = New SpSharedRecoContext
        
        Set myGrammar = RC.CreateGrammar
        myGrammar.DictationSetState SGDSActive
    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