mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Show warning for running non-English with English-only models - thx Purfview :)
Related to ae5c93d634 (commitcomment-140600266)
This commit is contained in:
parent
90731f97e0
commit
6a9c8465bc
@ -384,6 +384,19 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_languageCode = GetLanguage(comboBoxLanguages.Text);
|
||||||
|
|
||||||
|
if (comboBoxModels.Items[comboBoxModels.SelectedIndex] is WhisperModel model &&
|
||||||
|
_languageCode != "en" && model.Name.EndsWith(".en", StringComparison.InvariantCulture))
|
||||||
|
{
|
||||||
|
var result = MessageBox.Show("English model should only be used with English language." + Environment.NewLine +
|
||||||
|
"Continue anyway?", Text, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning);
|
||||||
|
if (result != DialogResult.Yes)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var f = SeLogger.GetWhisperLogFilePath();
|
var f = SeLogger.GetWhisperLogFilePath();
|
||||||
@ -400,7 +413,6 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText
|
|||||||
_useCenterChannelOnly = Configuration.Settings.General.FFmpegUseCenterChannelOnly &&
|
_useCenterChannelOnly = Configuration.Settings.General.FFmpegUseCenterChannelOnly &&
|
||||||
FfmpegMediaInfo.Parse(_videoFileName).HasFrontCenterAudio(_audioTrackNumber);
|
FfmpegMediaInfo.Parse(_videoFileName).HasFrontCenterAudio(_audioTrackNumber);
|
||||||
|
|
||||||
_languageCode = GetLanguage(comboBoxLanguages.Text);
|
|
||||||
IncompleteModel = false;
|
IncompleteModel = false;
|
||||||
ShowProgressBar();
|
ShowProgressBar();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user