Fix for last commit

This commit is contained in:
niksedk 2023-04-25 21:21:28 +02:00
parent a3155236e5
commit 25cfeb9c79
4 changed files with 10 additions and 2 deletions

View File

@ -203,6 +203,7 @@ Read more info (web)?</WhisperNotFound>
<MaxCharsPerSubtitle>Max. chars per subtitle line</MaxCharsPerSubtitle> <MaxCharsPerSubtitle>Max. chars per subtitle line</MaxCharsPerSubtitle>
<RemoveTemporaryFiles>Remove temporary files</RemoveTemporaryFiles> <RemoveTemporaryFiles>Remove temporary files</RemoveTemporaryFiles>
<SetCppConstMeFolder>Set CPP/Const-me models folder...</SetCppConstMeFolder> <SetCppConstMeFolder>Set CPP/Const-me models folder...</SetCppConstMeFolder>
<OnlyRunPostProcessing>Run only post-processing/adjust timings</OnlyRunPostProcessing>
</AudioToText> </AudioToText>
<AssaAttachments> <AssaAttachments>
<Title>Advanced Sub Station Alpha attachments</Title> <Title>Advanced Sub Station Alpha attachments</Title>

View File

@ -1534,8 +1534,12 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
_subtitle = WhisperTimingFixer.ShortenLongTexts(_subtitle); _subtitle = WhisperTimingFixer.ShortenLongTexts(_subtitle);
_subtitle = WhisperTimingFixer.ShortenViaWavePeaks(_subtitle, wavePeaks); _subtitle = WhisperTimingFixer.ShortenViaWavePeaks(_subtitle, wavePeaks);
} }
else if (!checkBoxUsePostProcessing.Checked)
{
return;
}
TranscribedSubtitle = postProcessor.Fix(AudioToTextPostProcessor.Engine.Whisper, _subtitle, true, true, true, true, true, true); TranscribedSubtitle = postProcessor.Fix(AudioToTextPostProcessor.Engine.Whisper, _subtitle, checkBoxUsePostProcessing.Checked, true, true, true, true, true);
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
} }
finally finally

View File

@ -350,7 +350,7 @@ namespace Nikse.SubtitleEdit.Logic
MaxCharsPerSubtitle = "Max. chars per subtitle line", MaxCharsPerSubtitle = "Max. chars per subtitle line",
RemoveTemporaryFiles = "Remove temporary files", RemoveTemporaryFiles = "Remove temporary files",
SetCppConstMeFolder = "Set CPP/Const-me models folder...", SetCppConstMeFolder = "Set CPP/Const-me models folder...",
OnlyRunPostProcessing = "", OnlyRunPostProcessing = "Run only post-processing/adjust timings",
}; };
AssaAttachments = new LanguageStructure.AssaAttachments AssaAttachments = new LanguageStructure.AssaAttachments

View File

@ -550,6 +550,9 @@ namespace Nikse.SubtitleEdit.Logic
case "AudioToText/SetCppConstMeFolder": case "AudioToText/SetCppConstMeFolder":
language.AudioToText.SetCppConstMeFolder = reader.Value; language.AudioToText.SetCppConstMeFolder = reader.Value;
break; break;
case "AudioToText/OnlyRunPostProcessing":
language.AudioToText.OnlyRunPostProcessing = reader.Value;
break;
case "AssaAttachments/Title": case "AssaAttachments/Title":
language.AssaAttachments.Title = reader.Value; language.AssaAttachments.Title = reader.Value;
break; break;