private void VoicePreviewButton_Click(object sender, RoutedEventArgs e)
        {
            AzureAccountStorageService.LoadUserAccount();
            AudioSettingsDialogWindow dialog = new AudioSettingsDialogWindow(AudioSettingsPage.AudioPreviewPage);
            AudioPreviewPage          page   = dialog.MainPage as AudioPreviewPage;

            page.PreviewDialogConfirmedHandler = OnSettingsDialogConfirmed;
            ConfigureAudioPreviewSettings(page);
            dialog.Title = "Audio Preview Window";
            dialog.ShowThematicDialog();
        }
        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);
        }