Minor fix for cancel whisper and keep partial translation

This commit is contained in:
niksedk 2022-12-07 20:06:31 +01:00
parent 7ee8f955df
commit 434e5fa958
2 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
private double _endSeconds;
private double _lastEstimatedMs = double.MaxValue;
private VideoInfo _videoInfo;
private WavePeakData _wavePeaks;
private readonly WavePeakData _wavePeaks;
public Subtitle TranscribedSubtitle { get; private set; }
@ -503,7 +503,7 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
_outputText?.Add("Loading result from STDOUT" + Environment.NewLine);
var sub = new Subtitle();
sub.Paragraphs.AddRange(resultTexts.OrderBy(p => p.Start).Select(p => new Paragraph(p.Text, (double)p.Start * 1000.0, (double)p.End * 1000.0)).ToList());
sub.Paragraphs.AddRange(_resultList.OrderBy(p => p.Start).Select(p => new Paragraph(p.Text, (double)p.Start * 1000.0, (double)p.End * 1000.0)).ToList());
return sub;
}

View File

@ -442,7 +442,7 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
{
using (var openFileDialog1 = new OpenFileDialog())
{
openFileDialog1.Title = "Locate whisper.exe (php version)";
openFileDialog1.Title = "Locate whisper.exe (OpenAI php version)";
openFileDialog1.FileName = string.Empty;
openFileDialog1.Filter = "whisper.exe|whisper.exe";