mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +01:00
Do not append voices when reloading
This commit is contained in:
parent
30ba6afdba
commit
740ac29f6b
@ -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<PiperModel>();
|
||||
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user