mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Fix loading whisper from srt
This commit is contained in:
parent
4b878aa920
commit
f0db9eaa21
@ -616,7 +616,17 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
|
||||
}
|
||||
|
||||
var whisperFolder = WhisperHelper.GetWhisperFolder() ?? string.Empty;
|
||||
if (!File.Exists(srtFileName))
|
||||
{
|
||||
srtFileName = Path.Combine(whisperFolder, Path.GetFileNameWithoutExtension(waveFileName)) + ".srt";
|
||||
}
|
||||
|
||||
var vttFileName = Path.Combine(whisperFolder, Path.GetFileName(waveFileName) + ".vtt");
|
||||
if (!File.Exists(vttFileName))
|
||||
{
|
||||
vttFileName = Path.Combine(whisperFolder, Path.GetFileNameWithoutExtension(waveFileName)) + ".vtt";
|
||||
}
|
||||
|
||||
if (!File.Exists(srtFileName) && !File.Exists(vttFileName))
|
||||
{
|
||||
resultTexts = new List<ResultText>();
|
||||
|
@ -79,8 +79,6 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
|
||||
removeTemporaryFilesToolStripMenuItem.Checked = Configuration.Settings.Tools.WhisperDeleteTempFiles;
|
||||
|
||||
ContextMenuStrip = contextMenuStripWhisperAdvanced;
|
||||
|
||||
buttonDownload.Enabled = Configuration.Settings.Tools.WhisperChoice != WhisperChoice.CTranslate2;
|
||||
}
|
||||
|
||||
private void ButtonGenerate_Click(object sender, EventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user