public static SpeechRecognitionService GetInstance()
 {
     if (speechRecognitionService == null)
     {
         speechRecognitionService = new SpeechRecognitionService();
     }
     return(speechRecognitionService);
 }
Exemplo n.º 2
0
        private void SetupVoice()
        {
            // Se configura el timer que activa la entrada Raton+Voz
            // Si se mantiene el botón izquierdo del ratón pulsado sin moverse durante 500 ms se activa el reconocimiento de voz
            voiceEnablingTimer          = new DispatcherTimer();
            voiceEnablingTimer.Interval = TimeSpan.FromMilliseconds(500);
            voiceEnablingTimer.Tick    += VoiceEnablingTimer_Tick;

            speechRecognitionService = SpeechRecognitionService.GetInstance();
        }
Exemplo n.º 3
0
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            mostrarPosibles = false;
            KeyDown        += new KeyEventHandler(MainWindow_KeyDown);

            _ug = new UniformGrid()
            {
                Rows = Sudoku.Tamaño / 3, Columns = Sudoku.Tamaño / 3, Background = Brushes.WhiteSmoke
            };
            mainGrid.Children.Add(_ug);
            _cuadrantes = new Cuadrante[Sudoku.Tamaño];

            SetupUdpmote();
            SetupNumbersPopup();
            SetupHeaders();
            SpeechRecognitionService.GetInstance().SetGrammar(GrammarType.MOUSE_VOICE);

            NuevaPartida();
        }