From 6756893d95ba44035748cef094c683c7ef6457dd Mon Sep 17 00:00:00 2001 From: Yuta Hayashibe Date: Fri, 23 Sep 2022 22:44:16 +0900 Subject: [PATCH] Add segment debug log --- whisper_streaming/cli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/whisper_streaming/cli.py b/whisper_streaming/cli.py index 7c24f10..12630eb 100644 --- a/whisper_streaming/cli.py +++ b/whisper_streaming/cli.py @@ -40,10 +40,13 @@ def transcribe_from_mic( channels=1, callback=sd_callback, ): + idx: int = 0 while True: + logger.debug(f"Segment: {idx}") segment = q.get() for chunk in wsp.transcribe(segment=segment): print(f"{chunk.start:.2f}->{chunk.end:.2f}\t{chunk.text}") + idx += 1 def get_opts() -> argparse.Namespace: