From d65fd8a649cb8f577e32b3cff193b85818ae7bad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Mach=C3=A1=C4=8Dek?= Date: Thu, 25 Jan 2024 17:53:07 +0100 Subject: [PATCH] fixes --- whisper_online.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/whisper_online.py b/whisper_online.py index e4bfff8..2941920 100644 --- a/whisper_online.py +++ b/whisper_online.py @@ -215,9 +215,9 @@ class OpenaiApiASR(ASRBase): "temperature": self.temperature } if self.task != "translate" and self.language: - transcription_params["language"] = self.language + params["language"] = self.language if prompt: - transcription_params["prompt"] = prompt + params["prompt"] = prompt if self.task == "translate": proc = self.client.audio.translations @@ -227,7 +227,7 @@ class OpenaiApiASR(ASRBase): # Process transcription/translation transcript = proc.create(**params) - print(f"OpenAI API processed accumulated {self.transcribed_seconds} seconds ",file=self.logfile) + print(f"OpenAI API processed accumulated {self.transcribed_seconds} seconds",file=self.logfile) return transcript.segments