예제 #1
0
        private void showConfirmation(SpeechRecognizer.SaidSomethingEventArgs e)
        {
            voiceConfirmEvent = e;

            switch (e.Verb)
            {
                case SpeechRecognizer.Verbs.CustomWall:
                case SpeechRecognizer.Verbs.CreateWall:
                case SpeechRecognizer.Verbs.EightBitWall:
                case SpeechRecognizer.Verbs.TranceWall:
                case SpeechRecognizer.Verbs.MetalWall:
                case SpeechRecognizer.Verbs.SaxWall:
                case SpeechRecognizer.Verbs.AnimalWall:
                case SpeechRecognizer.Verbs.BeatboxWall:
                case SpeechRecognizer.Verbs.KinectUp:
                case SpeechRecognizer.Verbs.KinectUpSmall:
                case SpeechRecognizer.Verbs.KinectDown:
                case SpeechRecognizer.Verbs.KinectDownSmall:
                case SpeechRecognizer.Verbs.Capture:
                case SpeechRecognizer.Verbs.ReturnToStart:
                case SpeechRecognizer.Verbs.Close:
                    MainWindow.mySpeechRecognizer.switchGrammar(new Choices[] { MainWindow.mySpeechRecognizer.booleanChoices }, false, false);
                    voicePromptVisual(true);

                    voiceConfirmTime = new DispatcherTimer();
                    voiceConfirmTime.Interval = TimeSpan.FromMilliseconds(5000);
                    voiceConfirmTime.Tick += new EventHandler(voiceConfirmTime_Tick);
                    voiceConfirmTime.Start();
                    break;
                case SpeechRecognizer.Verbs.VoiceHelp:
                    if (MainWindow.mySpeechRecognizer.paused == true)
                    {
                        MainWindow.mySpeechRecognizer.toggleListening(true);
                    }
                    MainWindow.mySpeechRecognizer.resetSpeechTimeout(10);
                    showHelpVisual();
                    break;
            }
        }
예제 #2
0
        private void showConfirmation(SpeechRecognizer.SaidSomethingEventArgs e)
        {
            voiceConfirmEvent = e;

            switch (voiceConfirmEvent.Verb)
            {
                case SpeechRecognizer.Verbs.Close:
                case SpeechRecognizer.Verbs.Instrument:
                case SpeechRecognizer.Verbs.WallOfSound:
                case SpeechRecognizer.Verbs.KinectUp:
                case SpeechRecognizer.Verbs.KinectUpSmall:
                case SpeechRecognizer.Verbs.KinectDown:
                case SpeechRecognizer.Verbs.KinectDownSmall:
                    MainWindow.mySpeechRecognizer.switchGrammar(new Choices[] { MainWindow.mySpeechRecognizer.booleanChoices }, false, false);

                    voicePromptVisual(true);

                    voiceConfirmTime = new DispatcherTimer();
                    voiceConfirmTime.Interval = TimeSpan.FromMilliseconds(5000);
                    voiceConfirmTime.Tick += new EventHandler(voiceConfirmTime_Tick);
                    voiceConfirmTime.Start();
                    break;
                case SpeechRecognizer.Verbs.VoiceHelp:
                    if (MainWindow.mySpeechRecognizer.paused == true)
                    {
                        MainWindow.mySpeechRecognizer.toggleListening(true);
                    }
                    MainWindow.mySpeechRecognizer.resetSpeechTimeout(10);
                    showHelpVisual();
                    break;
            }
        }
예제 #3
0
        private void showConfirmation(SpeechRecognizer.SaidSomethingEventArgs e)
        {
            voiceConfirmEvent = e;

            switch (voiceConfirmEvent.Verb)
            {
                case SpeechRecognizer.Verbs.DrumsSwitch:
                case SpeechRecognizer.Verbs.GuitarSwitch:
                case SpeechRecognizer.Verbs.LeftyGuitarSwitch:
                case SpeechRecognizer.Verbs.ElectricGuitarSwitch:
                case SpeechRecognizer.Verbs.LeftyElectricGuitarSwitch:
                case SpeechRecognizer.Verbs.KeyboardSwitch:
                case SpeechRecognizer.Verbs.TriangleSwitch:
                case SpeechRecognizer.Verbs.StartMetronome:
                case SpeechRecognizer.Verbs.StopMetronome:
                case SpeechRecognizer.Verbs.KinectUp:
                case SpeechRecognizer.Verbs.KinectUpSmall:
                case SpeechRecognizer.Verbs.KinectDown:
                case SpeechRecognizer.Verbs.KinectDownSmall:
                case SpeechRecognizer.Verbs.BackToInstruments:
                case SpeechRecognizer.Verbs.Capture:
                case SpeechRecognizer.Verbs.ReturnToStart:
                case SpeechRecognizer.Verbs.Close:
                    MainWindow.mySpeechRecognizer.switchGrammar(new Choices[] { MainWindow.mySpeechRecognizer.booleanChoices }, false, false);

                    voicePromptVisual(true);

                    voiceConfirmTime = new DispatcherTimer();
                    voiceConfirmTime.Interval = TimeSpan.FromMilliseconds(5000);
                    voiceConfirmTime.Tick += new EventHandler(voiceConfirmTime_Tick);
                    voiceConfirmTime.Start();
                    break;
                case SpeechRecognizer.Verbs.VoiceHelp:
                    if (MainWindow.mySpeechRecognizer.paused == true)
                    {
                        MainWindow.mySpeechRecognizer.toggleListening(true);
                    }
                    MainWindow.mySpeechRecognizer.resetSpeechTimeout(10);
                    showHelpVisual();
                    break;
            }
        }