private void ConfigureAudioPreviewSettings(AudioPreviewPage page) { string textToSpeak = captionTextBox.Text.Trim(); string voiceName = StringUtility.ExtractVoiceNameFromVoiceLabel(audioNameLabel.Text.ToString()); if (!AudioService.CheckIfVoiceExists(voiceName)) { page.SetAudioPreviewSettings(textToSpeak, VoiceType.DefaultVoice, AudioSettingService.selectedVoice); return; } string defaultPostfix = StringUtility.ExtractDefaultLabelFromVoiceLabel(audioNameLabel.Text.ToString()); VoiceType voiceType = AudioService.GetVoiceTypeFromString(voiceName, defaultPostfix); IVoice voice = AudioService.GetVoiceFromString(voiceName); page.SetAudioPreviewSettings(textToSpeak, voiceType, voice); }