/// <summary>
        /// fetch the Text-to-Speech Configuration and write it to File
        /// </summary>
        private void ttsUpdated()
        {
            SpeechServiceConfiguration speechConfiguration = new SpeechServiceConfiguration();

            speechConfiguration.StandardVoice   = ttsVoiceDropDown.SelectedValue == null || ttsVoiceDropDown.SelectedValue.ToString() == "Windows TTS default" ? null : ttsVoiceDropDown.SelectedValue.ToString();
            speechConfiguration.Volume          = (int)ttsVolumeSlider.Value;
            speechConfiguration.Rate            = (int)ttsRateSlider.Value;
            speechConfiguration.EffectsLevel    = (int)ttsEffectsLevelSlider.Value;
            speechConfiguration.DistortOnDamage = ttsDistortCheckbox.IsChecked.Value;
            speechConfiguration.ToFile();
        }
Exemple #2
0
        /// <summary>
        /// fetch the Text-to-Speech Configuration and write it to File
        /// </summary>
        private void ttsUpdated()
        {
            SpeechServiceConfiguration speechConfiguration = new SpeechServiceConfiguration
            {
                StandardVoice   = ttsVoiceDropDown.SelectedValue == null || ttsVoiceDropDown.SelectedValue.ToString() == "Windows TTS default" ? null : ttsVoiceDropDown.SelectedValue.ToString(),
                Volume          = (int)ttsVolumeSlider.Value,
                Rate            = (int)ttsRateSlider.Value,
                EffectsLevel    = (int)ttsEffectsLevelSlider.Value,
                DistortOnDamage = ttsDistortCheckbox.IsChecked.Value,
                DisableSsml     = disableSsmlCheckbox.IsChecked.Value,
                EnableIcao      = enableIcaoCheckbox.IsChecked.Value
            };

            speechConfiguration.ToFile();
            SpeechService.Instance.ReloadConfiguration();
        }
 /// <summary>
 /// fetch the Text-to-Speech Configuration and write it to File
 /// </summary>
 private void ttsUpdated()
 {
     SpeechServiceConfiguration speechConfiguration = new SpeechServiceConfiguration();
     speechConfiguration.StandardVoice = ttsVoiceDropDown.SelectedValue == null || ttsVoiceDropDown.SelectedValue.ToString() == "Windows TTS default" ? null : ttsVoiceDropDown.SelectedValue.ToString();
     speechConfiguration.Rate = (int)ttsRateSlider.Value;
     speechConfiguration.EffectsLevel = (int)ttsEffectsLevelSlider.Value;
     speechConfiguration.DistortOnDamage = ttsDistortCheckbox.IsChecked.Value;
     speechConfiguration.ToFile();
 }