Ejemplo n.º 1
0
        void SpeechRecognitionEngine_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
        {
            OMD.Main.Logger.Trace("SpeechRecognitionEngine_SpeechRecognized()");
            string recoginzedText = e.Result.Text;

            if (e.Result.Confidence >= 0.70)
            {
                Game.LogTrivial("Recognized text: " + recoginzedText);
                Game.DisplayNotification("Recognized text: " + recoginzedText);
                OMD.Main.Logger.Debug("Recognized text: " + recoginzedText);
                CheckProcessorsFor(commandsPerInput.GetAction(recoginzedText));
                StopRecording();
            }
            else
            {
                Game.LogTrivial("Speech not recognized: " + recoginzedText);
                OMD.Main.Logger.Debug("Speech not recognized:" + recoginzedText);
                Game.DisplayNotification("Did not copy, please repeat.");
            }
        }