From f936bf4b5ebbb210410e0d1ad7d498fd97b77ac8 Mon Sep 17 00:00:00 2001 From: Yuta Hayashibe Date: Fri, 23 Sep 2022 23:07:01 +0900 Subject: [PATCH] Add debug log --- whisper_streaming/transcriber.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/whisper_streaming/transcriber.py b/whisper_streaming/transcriber.py index 59afed4..b0a7452 100644 --- a/whisper_streaming/transcriber.py +++ b/whisper_streaming/transcriber.py @@ -216,6 +216,7 @@ class WhisperStreamingTranscriber: # do not feed the prompt tokens if a high temperature was used del self.buffer_tokens self.buffer_tokens = [] + logger.debug(f"Length of buffer: {len(self.buffer_tokens)}") def transcribe( self, @@ -245,6 +246,10 @@ class WhisperStreamingTranscriber: segment=segment, ) result = results[0] + logger.debug( + f"Result: temperature={result.temperature}, no_speech_prob={result.no_speech_prob}, " + f"avg_logprob={result.avg_logprob}" + ) if self.config.no_speech_threshold is not None: if (result.no_speech_prob > self.config.no_speech_threshold) and not (