mirror of
https://github.com/openai/whisper.git
synced 2025-03-30 14:28:27 +00:00
improved warning message for English-only models
This commit is contained in:
parent
8cf36f3508
commit
2d3032de01
@ -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"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user