diff --git a/src/ui/Forms/Tts/TextToSpeech.cs b/src/ui/Forms/Tts/TextToSpeech.cs index 437057930..b5d04fb80 100644 --- a/src/ui/Forms/Tts/TextToSpeech.cs +++ b/src/ui/Forms/Tts/TextToSpeech.cs @@ -1890,15 +1890,15 @@ namespace Nikse.SubtitleEdit.Forms.Tts Directory.CreateDirectory(ttsPath); } - var elevenLabsPath = Path.Combine(ttsPath, "Piper"); - if (!Directory.Exists(elevenLabsPath)) + var piperPath = Path.Combine(ttsPath, "Piper"); + if (!Directory.Exists(piperPath)) { - Directory.CreateDirectory(elevenLabsPath); + Directory.CreateDirectory(piperPath); } var result = new List(); - var jsonFileName = Path.Combine(elevenLabsPath, "voices.json"); + var jsonFileName = Path.Combine(piperPath, "voices.json"); if (!File.Exists(jsonFileName)) { @@ -1915,7 +1915,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts if (!string.IsNullOrEmpty(fileName)) { var name = entry.FilenameInZip; - var path = Path.Combine(elevenLabsPath, name.Replace('/', Path.DirectorySeparatorChar)); + var path = Path.Combine(piperPath, name.Replace('/', Path.DirectorySeparatorChar)); zip.ExtractFile(entry, path); } } @@ -2403,6 +2403,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts } else if (engine.Id == TextToSpeechEngineId.ElevenLabs) { + _elevenLabVoices.Clear(); GetElevenLabVoices(false); nikseComboBoxEngine_SelectedIndexChanged(null, null); }