Exemplo n.º 1
0
        public SpeechSynthesizerInfo()
        {
            _config = (IDIFrameworkSection)ConfigurationManager.GetSection("idiFrameworkSection");
            SpeechSynthesizer = new SpeechSynthesizer();
            try
            {
                SpeechSynthesizer.SelectVoice(_config.SpeechSynthesizerElement.Name);
                SpeechSynthesizer.SetOutputToDefaultAudioDevice();
            }
            catch (Exception ex)
            {

                throw new IDISynthetizerVoiceException("There seems to be a problem selecting the voice, " +
                                                       "are you sure the voice exists?", ex);
            }
        }
Exemplo n.º 2
0
 public SpeechRecognizerInfo()
 {
     _config = (IDIFrameworkSection)ConfigurationManager.GetSection("idiFrameworkSection");
     _speechRecognitionEngine = SetupSpeechRecognitionEngine();
 }