From 66e73e1c6ba638c26a81cc21f271824552fb43fa Mon Sep 17 00:00:00 2001 From: Jaikinator Date: Mon, 19 Jun 2023 15:56:46 +0200 Subject: [PATCH] added kwargs support for load model --- autotranscript/transcriber.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autotranscript/transcriber.py b/autotranscript/transcriber.py index e4d587a..39c0842 100644 --- a/autotranscript/transcriber.py +++ b/autotranscript/transcriber.py @@ -6,7 +6,6 @@ from glob import glob whisper = TypeVar('whisper') Tensor = TypeVar('Tensor') nparray = TypeVar('nparray') -Transcriber = TypeVar('Transcriber') def get_whisper_default_path() -> str: """ @@ -69,7 +68,8 @@ class Transcriber: def load_model(cls, model: str = "medium", local : bool = True, - download_root: str = WHISPER_DEFAULT_PATH) -> Transcriber: + download_root: str = WHISPER_DEFAULT_PATH , + *args, **kwargs) -> 'Transcriber': """ Load whisper module @@ -117,7 +117,7 @@ class Transcriber: "model first. By deactivating the local flag, " / "the model will be downloaded automatically.") - _model = load_model(model, download_root=download_root) + _model = load_model(model, download_root=download_root, *args, **kwargs) return cls(_model)