public CardEditorWindow(Settings settings, string tempDirPath, YandexSpeech yandexSpeech, Card card, bool withoutSpace) { InitializeComponent(); Caption = card.Title; Image = SetImageFromPath(card.ImagePath); AudioPath = card.AudioPath; _yandexSpeech = yandexSpeech; _tempDirPath = tempDirPath; _settings = settings; voiceSelect.ItemsSource = YandexVoice.VOICES; voiceSelect.SelectedItem = YandexVoice.FindById(settings.VoiceId); acceptButton.Content = "Изменить"; _withoutSpace = withoutSpace; if (withoutSpace == true) { panelWithAudioButtons.Visibility = Visibility.Hidden; infoAboutAudioTextBlock.Visibility = Visibility.Visible; } SetCardType(card.CardType); }
public async Task <string> GetAudio(string text) { return(await GetAudio(text, YandexVoice.FindById(_settings.VoiceId))); }