From 2d3032de014c514d5c029baccb898b5342463674 Mon Sep 17 00:00:00 2001 From: Jong Wook Kim Date: Sun, 25 Sep 2022 02:10:36 -0700 Subject: [PATCH] improved warning message for English-only models --- whisper/transcribe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whisper/transcribe.py b/whisper/transcribe.py index 5d1ead790..52b27ebe0 100644 --- a/whisper/transcribe.py +++ b/whisper/transcribe.py @@ -257,7 +257,7 @@ def cli(): device: str = args.pop("device") os.makedirs(output_dir, exist_ok=True) - if model_name.endswith(".en") and args["language"] != "en": + if model_name.endswith(".en") and args["language"] not in {"en", "English"}: warnings.warn(f"{model_name} is an English-only model but receipted '{args['language']}'; using English instead.") args["language"] = "en"