mirror of
https://github.com/shirayu/whispering.git
synced 2024-06-02 21:39:28 +00:00
Add segment debug log
This commit is contained in:
parent
64060ee8b4
commit
6756893d95
|
@ -40,10 +40,13 @@ def transcribe_from_mic(
|
||||||
channels=1,
|
channels=1,
|
||||||
callback=sd_callback,
|
callback=sd_callback,
|
||||||
):
|
):
|
||||||
|
idx: int = 0
|
||||||
while True:
|
while True:
|
||||||
|
logger.debug(f"Segment: {idx}")
|
||||||
segment = q.get()
|
segment = q.get()
|
||||||
for chunk in wsp.transcribe(segment=segment):
|
for chunk in wsp.transcribe(segment=segment):
|
||||||
print(f"{chunk.start:.2f}->{chunk.end:.2f}\t{chunk.text}")
|
print(f"{chunk.start:.2f}->{chunk.end:.2f}\t{chunk.text}")
|
||||||
|
idx += 1
|
||||||
|
|
||||||
|
|
||||||
def get_opts() -> argparse.Namespace:
|
def get_opts() -> argparse.Namespace:
|
||||||
|
|
Loading…
Reference in a new issue