Add segment debug log

This commit is contained in:
Yuta Hayashibe 2022-09-23 22:44:16 +09:00
parent 64060ee8b4
commit 6756893d95

View file

@ -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: