From 8a1bdda393febefa42250057a0a2112744665cda Mon Sep 17 00:00:00 2001 From: Jaikinator Date: Fri, 16 Jun 2023 12:11:13 +0200 Subject: [PATCH] added verbose dafault value to be false --- autotranscript/transcriber.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/autotranscript/transcriber.py b/autotranscript/transcriber.py index 57a3423..4fbf14b 100644 --- a/autotranscript/transcriber.py +++ b/autotranscript/transcriber.py @@ -44,16 +44,11 @@ class Transcriber: """ kwargs = self._get_whisper_kwargs(**kwargs) + + if "verbose" not in kwargs: + kwargs["verbose"] = False - if kwargs or args: - result = self.model.transcribe(audio, *args, **kwargs) - else: - # if kwargs is empty but parsed anyway whisper - # will not use the default kwargs - - print("No kwargs parsed. Using default kwargs.") - result = self.model.transcribe(audio) - + result = self.model.transcribe(audio, *args, **kwargs) return result["text"] @staticmethod