Skip to content

Commit

Permalink
fixed get_tokenizer()
Browse files Browse the repository at this point in the history
-fixed `get_tokenizer()` missing positional argument for `get_valid_language()`
  • Loading branch information
jianfch committed Jan 11, 2025
1 parent cd9232e commit 3d0e14d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stable_whisper/whisper_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,5 +328,5 @@ def get_tokenizer(model=None, is_faster_model: bool = False, **kwargs):
(model.num_languages if hasattr(model, 'num_languages') else model.model.num_languages)
elif 'num_languages' in kwargs:
del kwargs['num_languages']
kwargs['language'] = get_valid_language(kwargs.get('language'))
kwargs['language'] = get_valid_language(kwargs.get('language'), is_faster_model, model)
return tokenizer(**kwargs)

0 comments on commit 3d0e14d

Please sign in to comment.