Example #1
0
        public CradiatorInstalledVoice GetClosestMatchingInstalledVoice(string voiceName)
        {
            if (voiceName.IsEmpty())
            {
                return(_speechSynth.SelectedVoice);
            }

            var selectedVoices =
                from voice in _speechSynth.GetInstalledVoices()
                where voice.Name.ContainsIgnoreCase(voiceName)
                orderby voice.Name
                select voice;

            return(selectedVoices.Any() ? selectedVoices.First() : _speechSynth.SelectedVoice);
        }
 void SetBindings()
 {
     this.DataContext = _configSettings;
     comboInstalledVoices.ItemsSource = _speechSynth.GetInstalledVoices();
 }