示例#1
0
 private void VoiceR_SpeechRecognitionRejected(object sender, SpeechRecognitionRejectedEventArgs e)
 {
     //Blade
     yHide = false;
     Fractal.Start();
     Blade.Start();
     left = Screen.PrimaryScreen.WorkingArea.Width - this.Width;
     this.SetDesktopLocation(left, top);
     frac.MICBOX.BackgroundImage = Properties.Resources.mickicker;
     Displayer("認識できませんでした(´・ω・`)");
 }
示例#2
0
        //音声認識後処理
        private void VoiceR_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
        {
            frac.MICBOX.BackgroundImage = Properties.Resources.mickicker;

            //Blade
            yHide = false;
            Fractal.Start();
            Blade.Start();
            left = Screen.PrimaryScreen.WorkingArea.Width - this.Width;
            this.SetDesktopLocation(left, top);

            Displayer("かんがえちう(*´ω`*)");
            //結果をString型で格納
            String Result = e.Result.Text;
            //認識照合率値
            float  Conf = e.Result.Confidence;
            String a    = e.Result.Grammar.Name;

            //認識が65%に満たない際処理せず
            if (Conf < 0.50)
            {
                Displayer("認識率が50%以下です もう一度発声してちょ"); return;
            }
            Displayer("RECOGNIZED : " + Result + " : " + a);
            if (a == "application")
            {
                StartAppilcation(Result);
            }
            else if (a == "grimore")
            {
                Replayer(Result);
            }
            else if (a == "search")
            {
                Searcher(Result);
            }
            else if (a == "weather")
            {
                grm.Weather(Result);
            }
        }