Ejemplo n.º 1
0
 private void LoadSpeechRecognitionGrammarsForUI() //TODO: split into separate methods and load based on current context, instead of loading all together
 {
     speechRecognition.Pause();
     LoadSpeechRecognitionGrammar("SpeechGrammar_Manager_en.xml", "Manager");
     LoadSpeechRecognitionGrammar("SpeechGrammar_Editor_en.xml", "Editor");
     LoadSpeechRecognitionGrammar("SpeechGrammar_Visualizer_en.xml", "Visualizer");
     speechRecognition.Resume();
 }
Ejemplo n.º 2
0
        public void Speak(string s)
        {
            if (speechSynthesis == null)
            {
                return;
            }

            if (speechRecognition != null)
            {
                speechRecognition.Pause();
            }
            speechSynthesis.Speak(s);
            if (speechRecognition != null)
            {
                speechRecognition.Resume();
            }
        }
Ejemplo n.º 3
0
 public void SpeakCommand(string command)
 {
     speechRecognition.Pause();
     speechSynthesis.Speak(command);
     speechRecognition.Resume();
 }