diff --git a/src/ui/Forms/GenerateVideoWithHardSubs.cs b/src/ui/Forms/GenerateVideoWithHardSubs.cs index 8244b40ad..7bedaeca6 100644 --- a/src/ui/Forms/GenerateVideoWithHardSubs.cs +++ b/src/ui/Forms/GenerateVideoWithHardSubs.cs @@ -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; diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index 7ba0b5b02..d0665a70c 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -35607,12 +35607,6 @@ namespace Nikse.SubtitleEdit.Forms return; } - if (_subtitle == null || _subtitle.Paragraphs.Count == 0) - { - DisplaySubtitleNotLoadedMessage(); - return; - } - if (!RequireFfmpegOk()) { return; diff --git a/src/ui/Forms/Tts/TextToSpeech.cs b/src/ui/Forms/Tts/TextToSpeech.cs index 1d31f52af..c7910dcbc 100644 --- a/src/ui/Forms/Tts/TextToSpeech.cs +++ b/src/ui/Forms/Tts/TextToSpeech.cs @@ -94,13 +94,13 @@ namespace Nikse.SubtitleEdit.Forms.Tts _engines = new List(); _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(); nikseComboBoxEngine.DropDownStyle = ComboBoxStyle.DropDownList;