Merge pull request #8929 from ivandrofly/dev

WhisperAudioToText: Bug fix 🐛
This commit is contained in:
Nikolaj Olsson 2024-10-22 16:20:19 +02:00 committed by GitHub
commit cc72a41711
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -560,17 +560,12 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
Configuration.Settings.Tools.WhisperPostProcessingFixShortDuration,
Configuration.Settings.Tools.WhisperPostProcessingSplitLines);
UpdateLog();
SeLogger.WhisperInfo(textBoxLog.Text);
if (transcript == null || transcript.Paragraphs.Count == 0)
{
UpdateLog();
SeLogger.WhisperInfo(textBoxLog.Text);
IncompleteModelName = comboBoxModels.Text;
}
else
{
UpdateLog();
SeLogger.WhisperInfo(textBoxLog.Text);
}
timer1.Stop();
@ -1054,8 +1049,8 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
}
else
{
var rawText = FileUtil.ReadAllLinesShared(srtFileName, Encoding.UTF8);
new WebVTT().LoadSubtitle(sub, rawText, srtFileName);
var rawText = FileUtil.ReadAllLinesShared(vttFileName, Encoding.UTF8);
new WebVTT().LoadSubtitle(sub, rawText, vttFileName);
outputText?.Add($"Loading result from {vttFileName}{Environment.NewLine}");
}