Friday, 13 September 2013

Ask a chain/multiple questions together (Voice/Speech Recognition)

Ask a chain/multiple questions together (Voice/Speech Recognition)

I need help asking my program a series of questions. For example:
I may say "hi computer" and I want my computer to respond saying "Hi, Sir.
How are you?" Then the computer would say "Fine and yourself?" and my
computer would say something else.
As of now I'm using Case statements. An example of my code below:
//Kindness
case "thank you":
case "thank you jarvis":
case "thanks":
case "thanks jarvis":
if (ranNum <= 3) { QEvent = ""; JARVIS.Speak("You're Welcome
Sir"); }
else if (ranNum <= 6) { QEvent = ""; JARVIS.Speak("Anytime"); }
else if (ranNum <= 10) { QEvent = ""; JARVIS.Speak("No problem
boss"); }
break;

No comments:

Post a Comment