Voice recognition webpage with asp.net | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Voice recognition webpage with asp.net

i want to build a web application for online banking with voice Assistance. like when I say go to transaction page it redirect to that page and in login or sign up there are also that type of voice recognition for that...but it continues in loop when I say hello it repeatedly says hello, hello.........how should I stop that ....

24th Oct 2018, 10:49 AM
Kumar Devashish
Kumar Devashish - avatar
6 Answers
0
Could you send the code?
25th Oct 2018, 4:48 AM
Eldar Bakerman
0
SpeechSynthesizer sSynth = newSpeechSynthesizer();      PromptBuilder pBuilder = new PromptBuilder();      SpeechRecognitionEngine sRecongnize = newSpeechRecognitionEngine(); Choices sList = new Choices();     sList.Add(new string[] { "hello", "world" });     Grammar gr = new Grammar(newGrammarBuilder(sList));        try     {    sRecongnize.RequestRecognizerUpdate();    sRecongnize.LoadGrammar(gr);    sRecongnize.SpeechRecognized += sRecongnise_SpeechRecongnised;    sRecongnize.SetInputToDefaultAudioDevice();    sRecongnize.RecognizeAsync(RecognizeMode.Multiple);    }    catch   {    return;   } private void sRecongnise_SpeechRecongnised(objectsender, SpeechRecognizedEventArgs e) {        if (e.Result.Text.ToString() == "hello")       {       textBox1.Text = e.Result.Text.ToString();       }      else if (e.Result.Text.ToString() == "document")      {       textBox1.Text = e.Result.Text.ToString();       } }
25th Oct 2018, 4:45 PM
Kumar Devashish
Kumar Devashish - avatar
0
that's the code but it repeats whatever I said that feeded into it ..
25th Oct 2018, 4:46 PM
Kumar Devashish
Kumar Devashish - avatar
0
Could you specify what does it repeat? A proper asked question should be clear and describe the expected output and the current output
25th Oct 2018, 8:53 PM
Eldar Bakerman
0
according to that code i added hello and world whenever I asked that it has to say hello only one time but after 2 or 3 seconds it repeats itself and automatically asked hello and continuous till I stop debugging
26th Oct 2018, 12:21 AM
Kumar Devashish
Kumar Devashish - avatar
0
It's all in a function right? Try checking if you accidentally created a loop to call the function
26th Oct 2018, 11:02 AM
Eldar Bakerman