mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Work on tts
This commit is contained in:
parent
5b5d306bbd
commit
2350e7b6b6
@ -690,7 +690,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts
|
||||
{
|
||||
WorkingDirectory = Path.GetDirectoryName(files[0]),
|
||||
FileName = pythonExe,
|
||||
Arguments = $"do_tts.py --output_path \"{_waveFolder}\" --preset ultra_fast --voice {v} --text \"{p.Text.RemoveChar('"')}\"",
|
||||
Arguments = $"do_tts.py --text \"{p.Text.RemoveChar('"')}\" --output_path \"{_waveFolder.TrimEnd(Path.DirectorySeparatorChar)}\" --preset ultra_fast --voice {v}",
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
}
|
||||
@ -709,6 +709,11 @@ namespace Nikse.SubtitleEdit.Forms.Tts
|
||||
}
|
||||
|
||||
var inputFile = Path.Combine(_waveFolder, $"{v}_0_2.wav");
|
||||
if (!File.Exists(inputFile))
|
||||
{
|
||||
throw new Exception("No file generated by Tortoise TTS?" + Environment.NewLine + inputFile + " not found!");
|
||||
}
|
||||
|
||||
File.Move(inputFile, outputFileName);
|
||||
|
||||
progressBar1.Refresh();
|
||||
|
Loading…
Reference in New Issue
Block a user