From 6840c360f3871603c6b4320adaa92d9965056b4a Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Thu, 5 Sep 2024 19:13:18 +0200 Subject: [PATCH] A bit more checking of Whisper errors --- src/ui/Forms/AudioToText/WhisperAudioToText.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ui/Forms/AudioToText/WhisperAudioToText.cs b/src/ui/Forms/AudioToText/WhisperAudioToText.cs index 799d34fb5..b82426c02 100644 --- a/src/ui/Forms/AudioToText/WhisperAudioToText.cs +++ b/src/ui/Forms/AudioToText/WhisperAudioToText.cs @@ -1116,10 +1116,18 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText { UnknownArgument = true; } + else if (outLine.Data.Contains("error: unknown arguments: ", StringComparison.OrdinalIgnoreCase)) + { + UnknownArgument = true; + } else if (outLine.Data.Contains("error: unrecognized argument: ", StringComparison.OrdinalIgnoreCase)) { UnknownArgument = true; } + else if (outLine.Data.Contains("error: unrecognized arguments: ", StringComparison.OrdinalIgnoreCase)) + { + UnknownArgument = true; + } if (outLine.Data.Contains("running on: CUDA", StringComparison.OrdinalIgnoreCase)) {