Skip to content

Commit

Permalink
fix:handle optional kwarg (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Oct 3, 2024
1 parent 8d5644d commit a351f08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ovos_stt_plugin_citrinet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def execute(self, audio: AudioData, language: Optional[str] = None):
Returns:
text (str): recognized text
'''
language = language or self.lang
lang = language.split("-")[0]
if lang not in available_languages:
raise ValueError(f"unsupported language, must be one of {available_languages}")
Expand Down

0 comments on commit a351f08

Please sign in to comment.