mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +01:00
parent
daa88f30c9
commit
780a8f7c7c
@ -33,6 +33,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private bool _promptFFmpegParameters;
|
||||
private readonly bool _mpvOn;
|
||||
private readonly string _mpvSubtitleFileName;
|
||||
private readonly bool _noSubtitles;
|
||||
public string VideoFileName { get; private set; }
|
||||
public long MillisecondsEncoding { get; private set; }
|
||||
private PreviewVideo _previewVideo;
|
||||
@ -49,6 +50,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_assaSubtitle = new Subtitle(assaSubtitle);
|
||||
_inputVideoFileName = inputVideoFileName;
|
||||
|
||||
_noSubtitles = _assaSubtitle == null ||
|
||||
_assaSubtitle.Paragraphs.Count == 0 ||
|
||||
(_assaSubtitle.Paragraphs.Count == 1 && string.IsNullOrWhiteSpace(_assaSubtitle.Paragraphs[0].Text));
|
||||
|
||||
if (format.GetType() == typeof(NetflixImsc11Japanese))
|
||||
{
|
||||
_assaSubtitle = new Subtitle();
|
||||
@ -148,7 +153,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
numericUpDownCutToSeconds.Left = numericUpDownCutToMinutes.Right + 1;
|
||||
|
||||
_isAssa = !fontSize.HasValue;
|
||||
if (fontSize.HasValue)
|
||||
if (fontSize.HasValue && !_noSubtitles)
|
||||
{
|
||||
if (fontSize.Value < numericUpDownFontSize.Minimum)
|
||||
{
|
||||
@ -268,9 +273,18 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
videoPlayerContainer1.Visible = false;
|
||||
}
|
||||
|
||||
if (_isAssa)
|
||||
if (_noSubtitles)
|
||||
{
|
||||
|
||||
checkBoxRightToLeft.Enabled = false;
|
||||
labelProgress.Text = LanguageSettings.Current.Main.NoSubtitleLoaded;
|
||||
if (Configuration.Settings.General.UseDarkTheme)
|
||||
{
|
||||
labelProgress.ForeColor = Color.Yellow;
|
||||
}
|
||||
else
|
||||
{
|
||||
labelProgress.ForeColor = Color.DarkGoldenrod;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -312,6 +326,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void buttonGenerate_Click(object sender, EventArgs e)
|
||||
{
|
||||
labelProgress.Text = string.Empty;
|
||||
labelProgress.ForeColor = UiUtil.ForeColor;
|
||||
|
||||
if (checkBoxCut.Checked)
|
||||
{
|
||||
var cutStart = GetCutStart();
|
||||
@ -1343,6 +1360,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void buttonPreview_Click(object sender, EventArgs e)
|
||||
{
|
||||
labelProgress.Text = string.Empty;
|
||||
labelProgress.ForeColor = UiUtil.ForeColor;
|
||||
|
||||
try
|
||||
{
|
||||
buttonPreview.Enabled = false;
|
||||
|
@ -35607,12 +35607,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
if (_subtitle == null || _subtitle.Paragraphs.Count == 0)
|
||||
{
|
||||
DisplaySubtitleNotLoadedMessage();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!RequireFfmpegOk())
|
||||
{
|
||||
return;
|
||||
|
@ -94,13 +94,13 @@ namespace Nikse.SubtitleEdit.Forms.Tts
|
||||
|
||||
_engines = new List<TextToSpeechEngine>();
|
||||
_engines.Add(new TextToSpeechEngine(TextToSpeechEngineId.Piper, "Piper (fast/good)", _engines.Count));
|
||||
_engines.Add(new TextToSpeechEngine(TextToSpeechEngineId.Tortoise, "Tortoise TTS (very slow/very good)", _engines.Count));
|
||||
_engines.Add(new TextToSpeechEngine(TextToSpeechEngineId.Coqui, "coqui TTS", _engines.Count));
|
||||
_engines.Add(new TextToSpeechEngine(TextToSpeechEngineId.Tortoise, "Tortoise TTS (very slow/good)", _engines.Count));
|
||||
_engines.Add(new TextToSpeechEngine(TextToSpeechEngineId.Coqui, "Coqui AI TTS (only one voice)", _engines.Count));
|
||||
if (Configuration.IsRunningOnWindows)
|
||||
{
|
||||
_engines.Add(new TextToSpeechEngine(TextToSpeechEngineId.MsSpeechSynthesizer, "Microsoft SpeechSynthesizer (very fast/robotic)", _engines.Count));
|
||||
}
|
||||
_engines.Add(new TextToSpeechEngine(TextToSpeechEngineId.ElevenLabs, "ElevenLabs TTS", _engines.Count));
|
||||
_engines.Add(new TextToSpeechEngine(TextToSpeechEngineId.ElevenLabs, "ElevenLabs TTS (online/pay/good)", _engines.Count));
|
||||
|
||||
_actorAndVoices = new List<ActorAndVoice>();
|
||||
nikseComboBoxEngine.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
|
Loading…
Reference in New Issue
Block a user