Skip to content

Commit

Permalink
improved warning message for English-only models
Browse files Browse the repository at this point in the history
  • Loading branch information
jongwook committed Sep 25, 2022
1 parent 8cf36f3 commit 2d3032d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion whisper/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 2d3032d

Please sign in to comment.