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

pass language as a parameter to avoid multi-language detection

parent 77894a7a
No related branches found
No related tags found
No related merge requests found
from dataclasses import dataclass, field from dataclasses import dataclass, field
from typing import Optional
@dataclass @dataclass
class WhisperSTTHandlerArguments: class WhisperSTTHandlerArguments:
language: Optional[str] = field(
default=None,
metadata={
"help": "The language for the conversation. Default is None."
},
)
stt_model_name: str = field( stt_model_name: str = field(
default="distil-whisper/distil-large-v3", default="distil-whisper/distil-large-v3",
metadata={ metadata={
...@@ -51,9 +58,9 @@ class WhisperSTTHandlerArguments: ...@@ -51,9 +58,9 @@ class WhisperSTTHandlerArguments:
"help": "The task to perform, typically 'transcribe' for transcription. Default is 'transcribe'." "help": "The task to perform, typically 'transcribe' for transcription. Default is 'transcribe'."
}, },
) )
stt_gen_language: str = field( language: Optional[str] = field(
default="en", default=None,
metadata={ metadata={
"help": "The language of the speech to transcribe. Default is 'en' for English." "help": "The language for the conversation. Default is None."
}, },
) )
\ 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