コード例 #1
0
 void engine_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
 {
     if (e.Result == null)
     {
         return;
     }
     //Console.WriteLine(e.Result.Text + "\n");
     //Console.WriteLine(e.Result.Grammar.Name + "\n");
     gbEX.ExecutionHandler(e);
     Console.Write(SpeechHandler.UtterResponse() + "\n");
     SpeechHandler.speechSynthesizer.SpeakAsync(SpeechHandler.UtterResponse());
     SpeechHandler.SetResponse("");
     if (ByeJarvis == 1)
     {
         ByeJarvis = 2;
     }
 }