Skip to content
Snippets Groups Projects
Commit 61e0d7c3 authored by andimarafioti's avatar andimarafioti Committed by Andres Marafioti
Browse files

set default back to english

parent f09cf64f
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,8 @@ class WhisperSTTHandler(BaseHandler):
self.torch_dtype = getattr(torch, torch_dtype)
self.compile_mode = compile_mode
self.gen_kwargs = gen_kwargs
if language == 'None':
language = None
self.last_language = language
if self.last_language is not None:
self.gen_kwargs["language"] = self.last_language
......
......@@ -59,8 +59,12 @@ class WhisperSTTHandlerArguments:
},
)
language: Optional[str] = field(
default=None,
default='en',
metadata={
"help": "The language for the conversation. Default is None."
"help": """The language for the conversation.
Choose between 'en' (english), 'fr' (french), 'es' (spanish),
'zh' (chinese), 'ko' (korean), 'ja' (japanese), or 'None'.
If using None, the language is automatically detected and can
change during the conversation. Default is 'en'."""
},
)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment