Exemplo n.º 1
0
        private static List <string> ConvertAudioPreferencesToList()
        {
            IVoice        defaultVoice = AudioSettingService.selectedVoice;
            List <string> voices       = AudioSettingService.preferredVoices.ToList().Select(x => x.VoiceName).ToList();

            voices.Insert(0, defaultVoice.ToString());
            return(voices);
        }
        private void OnSettingsDialogConfirmed(string textToPreview, VoiceType selectedVoiceType, IVoice selectedVoice)
        {
            captionTextBox.Text = textToPreview;
            switch (selectedVoiceType)
            {
            case VoiceType.AzureVoice:
            case VoiceType.ComputerVoice:
            case VoiceType.WatsonVoice:
                audioNameLabel.Text = selectedVoice.ToString();
                break;

            case VoiceType.DefaultVoice:
                audioNameLabel.Text = string.Format(ELearningLabText.AudioDefaultLabelFormat,
                                                    AudioSettingService.selectedVoice.ToString());
                break;

            default:
                break;
            }
        }
Exemplo n.º 3
0
 public override string ToString() => Voice.ToString();
Exemplo n.º 4
0
 internal SVoice(IVoice i)
 {
     Voice = i;
     name  = Voice.ToString();
 }