Trying to make "--standard" default for Purfview's Faster Whisper (as non-standard gives bad time codes and text lengths)

This commit is contained in:
Nikolaj Olsson 2024-03-14 17:29:18 +01:00
parent add752738b
commit cf04f04957

View File

@ -1993,6 +1993,19 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
private void comboBoxWhisperEngine_SelectedIndexChanged(object sender, EventArgs e) private void comboBoxWhisperEngine_SelectedIndexChanged(object sender, EventArgs e)
{ {
if (comboBoxWhisperEngine.Text != WhisperChoice.PurfviewFasterWhisper && Configuration.Settings.Tools.WhisperExtraSettings.Contains("--standard", StringComparison.Ordinal))
{
Configuration.Settings.Tools.WhisperExtraSettings = Configuration.Settings.Tools.WhisperExtraSettings.Replace("--standard", string.Empty).Trim();
labelAdvanced.Text = Configuration.Settings.Tools.WhisperExtraSettings;
}
else if (comboBoxWhisperEngine.Text == WhisperChoice.PurfviewFasterWhisper &&
!Configuration.Settings.Tools.WhisperExtraSettings.Contains("--standard", StringComparison.Ordinal) &&
Configuration.Settings.Tools.WhisperPurfviewFasterWhisperDefaultCmd == "--standard")
{
Configuration.Settings.Tools.WhisperExtraSettings = Configuration.Settings.Tools.WhisperPurfviewFasterWhisperDefaultCmd;
labelAdvanced.Text = Configuration.Settings.Tools.WhisperExtraSettings;
}
if (comboBoxWhisperEngine.Text == Configuration.Settings.Tools.WhisperChoice) if (comboBoxWhisperEngine.Text == Configuration.Settings.Tools.WhisperChoice)
{ {
return; return;