C# Development Tutorial | Voice Recognition
Why Stack Overflow recommends it
Stack Overflow users cite it as the tutorial they followed when building C# speech recognition apps, usually in questions about code that fails or behaves oddly after copying its approach.
Recommended by 0 people across 0 different months, 2015 to 2017.
What it is
A 15-minute C# tutorial from Johnny Manson showing how to add voice commands to a .NET application using the System.Speech recognition classes. It walks through setting up a recognition engine, defining a command grammar, and reacting to recognized phrases.
What people said
Cites Eliseo · 2015-08 · Stack Overflow · on “How to speech recognition from video playback?”
I currently have an application that can detect my speech based on the tutorial at [this video] In the load event of this form I have the following //Global Variable SpeechRecognitionEngine recEngine = new SpeechRecognitionEngine(); private void frmMain_Load(object sender, EventArgs e) { //hide border to prevent screen burnout this.FormBorderStyle = FormBorderStyle.None; Choices commands = new Choices(); commands.Add(new string[] { "stock", "news", "percent", "down" }); //need to read company list from db GrammarBuilder gBuilder = new GrammarBuilder(); gBuilder.Append(commands); Grammar grammar = new Grammar(gBuilder); recEngine.LoadGrammarAsync(grammar); //THIS IS PROBABLY WHERE I NEED HELP-----
Cites Hasan A Yousef · 2017-01 · Stack Overflow · on “Console Speech Recognition exits right after start”
I tried to follow this [this video] tutorial in building voice recognition C# app, the only difference is I wanted to have a Console app, not a Win Form app, so I wrote this this code: using System; using System.Speech.Recognition; //using System.Speech.Synthesis; namespace Voice_Recognation { class Program { static void Main(string[] args) { SpeechRecognitionEngine recEngine = new SpeechRecognitionEngine(); recEngine.SetInputToDefaultAudioDevice(); Choices commands = new Choices(); commands.Add(new string[] { "say Hi", "say Hello"}); GrammarBuilder gb = new GrammarBuilder(); gb.Append(commands); Grammar g = new Grammar(gb); recEngine.LoadGrammarAsync(g); recEngine.RecognizeAsync(RecognizeMode.Mu
Cites L_Pav · 2017-05 · Stack Overflow · on “Issue with recognising speech in C#”
I was coding a speech recognition application, and I found an example here [this video] . I was following the code as close as possible, only with little variation, but then when I launched the application I caught the InnerException, on line 24, specifically the At least one grammar must be loaded before doing a recognition issue. I have copied the code line to line (in educational purposes), so I am pretty sure that it must work, but for some reason it does not. My code is: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Syst