Search code examples
c#windowsspeech-recognitionsapi

Is it possible to use Windows Speech Recognition built in commands without its shared interface?


I wanted to know whether it is possible to use Windows Speech Recognition built in Commands without the shared interface of WSR. I'm using SAPI in C# programming Language.

Any help will be really appreciated.


Solution

  • You need to use an in process recognizer. So searching for SpInprocRecognizer should give you more information about it.

    When you create your recognizer you should do something like:

    private ISpeechRecoContext RecoContext;
    private SpInprocRecognizer Recognizer;
    private ISpeechRecoGrammar Grammar;
    
    // Create a new recognizer
    Recognizer = new SpInprocRecognizer();
    // Create a recognition context.
    RecoContext = Recognizer.CreateRecoContext();
    

    Then you recognize as normal, and you won't see the windows recognizer GUI.