


Tried converting it to a console app and it works, but I need this in a windows forms app. Register a handler for the SpeechRecognized event. Sre.RecognizeAsync(RecognizeMode.Multiple) Sre.SpeechRecognized += new EventHandler(SpeechRecognized) build grammer, load grammer, enable voice recognition give the grammer builder the jargon choices Private void btnSubmit_Click(object sender, EventArgs e)įoreach (DataGridViewRow r in myGridView.Rows) loop as many times as need to create the rows Clear out the existing row and column styles

Private void GenerateTable(int columnCount, int rowCount) words length is equal to number of rows Private void btnCreate_Click(object sender, EventArgs e) Grammar g private int columns \u003d 2 private int rows Dictionary HotKeys \u003d new Dictionary () public Form1 () (InitializeComponent () ) private void Form1_Load (object sender, EventArgs e) () private void SpeechRecognized (object sender, SpeechRecognizedEventArgs e) (MessageBox.Show ("ping") // to implement loop through the words array if the match call approporaite method for (int i \u003d 0 i< words.Length i++) Using System using using System.ComponentModel using System.Data using System.Drawing using System.Linq using System.Text using using using System.Speech using namespace HotKeyApp (public partial class Form1: Form (// initialize speech recognizer SpeechRecognitionEngine sre \u003d new SpeechRecognitionEngine (new ("en-US")) // initialize grammer builder GrammarBuilder gb \u003d new GrammarBuilder () / / choices will contain the words from the first column Choices jargon \u003d new Choices () // words will contain the array to give choices string words // A speech recognition grammar is a set of rules or constraints that define what a speech recognition engine can recognize as meaningful input. this means the wordlist is correctly added and the speech recognized event is functioning correctly, but it is never called without emulaterecognize. I tried to use the emulaterecognize function and the app works fine, but it doesn't work when I say. Im trying to build a dynamic speech recognizer but it doesn't work for some reason.
