logging in ASR proc. includes internal buffer duration and transcription lag
Browse files
whisperlivekit/audio_processor.py
CHANGED
@@ -283,7 +283,13 @@ class AudioProcessor:
|
|
283 |
self.transcription_queue.task_done()
|
284 |
continue
|
285 |
|
286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
|
288 |
# Process transcription
|
289 |
self.online.insert_audio_chunk(pcm_array)
|
|
|
283 |
self.transcription_queue.task_done()
|
284 |
continue
|
285 |
|
286 |
+
asr_internal_buffer_duration_s = len(self.online.audio_buffer) / self.online.SAMPLING_RATE
|
287 |
+
transcription_lag_s = max(0.0, time() - self.beg_loop - self.end_buffer)
|
288 |
+
|
289 |
+
logger.info(
|
290 |
+
f"ASR processing: internal_buffer={asr_internal_buffer_duration_s:.2f}s, "
|
291 |
+
f"lag={transcription_lag_s:.2f}s."
|
292 |
+
)
|
293 |
|
294 |
# Process transcription
|
295 |
self.online.insert_audio_chunk(pcm_array)
|