diff --git a/Mirivoice/Views/VoicersStyleBox.axaml.cs b/Mirivoice/Views/VoicersStyleBox.axaml.cs index 2506e36..0bc3fb2 100644 --- a/Mirivoice/Views/VoicersStyleBox.axaml.cs +++ b/Mirivoice/Views/VoicersStyleBox.axaml.cs @@ -56,13 +56,17 @@ public async void OnSamplePlayButtonClick(object sender, RoutedEventArgs e) if (File.Exists(cachePath)) { isPlaying = true; + v.PlayAudio(cachePath); + return; } if (voicer != null) { isPlaying = true; string ipa = await phonemizer.ConvertToIPA(phrase, DispatcherPriority.ApplicationIdle); voicer.Inference(ipa, cachePath, null, sid); + v.PlayAudio(cachePath); + return; } - v.PlayAudio(cachePath); + } } \ No newline at end of file