diff --git a/src/ui/Forms/Tts/TextToSpeech.cs b/src/ui/Forms/Tts/TextToSpeech.cs index 005e19018..743c6d8ad 100644 --- a/src/ui/Forms/Tts/TextToSpeech.cs +++ b/src/ui/Forms/Tts/TextToSpeech.cs @@ -339,6 +339,14 @@ namespace Nikse.SubtitleEdit.Forms.Tts File.Delete(fileName); } } + + foreach (var fileName in Directory.GetFiles(waveFolder, "*.mp3")) + { + if (!fileName.Equals(resultAudioFile, StringComparison.OrdinalIgnoreCase)) + { + File.Delete(fileName); + } + } } private List FixParagraphAudioSpeed(Subtitle subtitle, string overrideFileName)