Dominik Macháček 2024-01-26
fixes
@38b5069a2b65fc0a3287f030a8e3fc10fdb81ac1
whisper_online.py
--- whisper_online.py
+++ whisper_online.py
@@ -215,9 +215,9 @@
             "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 @@
         # 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
 
Add a comment
List