+ 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 ....
6 Réponses
0
Could you send the code?
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();
}
}
0
that's the code but it repeats whatever I said that feeded into it ..
0
Could you specify what does it repeat? A proper asked question should be clear and describe the expected output and the current output
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
0
It's all in a function right? Try checking if you accidentally created a loop to call the function