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?
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.
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);
}
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With