Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable built-in speech recognition commands?

I'm trying to build software that interprets various textual commands, all in a custom way. I use System.Speech.Recognition and it works surprisingly well, but I can't figure how to get around the fact that whenever I say "Delete", "Close", "Correct", etc, I will end up with the default Windows (7) implementation. Is there any way to get around that with System.Speech.Recognition? If not, which C# .NET library would you recommend the most?

like image 890
Lazlo Avatar asked Feb 01 '11 00:02

Lazlo


People also ask

How do I turn off setup Speech Recognition?

The procedure to disable online Speech Recognition is as follows: Right-click on the Start button and select Settings. Go to Privacy & security >> Speech. Turn OFF the switch for online speech recognition.


1 Answers

Use SpeechRecognitionEngine instead of SpeechRecognizer.
Try this:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Speech.Recognition;
namespace speech
{
class Program
{
    static void Main(string[] args)
    {
        SpeechRecognitionEngine mynizer = new SpeechRecognitionEngine();

        GrammarBuilder builder = new GrammarBuilder();
        builder.AppendDictation();
        Grammar mygram = new Grammar(builder);
        mynizer.SetInputToDefaultAudioDevice();
        mynizer.LoadGrammar(mygram);
        while (true)
        {
            Console.WriteLine(mynizer.Recognize().Text);
        }
    }

}
}
like image 98
bbosak Avatar answered Nov 13 '22 03:11

bbosak