From 5db3b0f7b10738ddcf34a1313be3288ccacce6f5 Mon Sep 17 00:00:00 2001 From: CorVous <60035620+CorVous@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:49:16 -0700 Subject: [PATCH] Previous behavior only slept when there was audio in the buffer. This caused two issues, it meant that quarter of a second pauses interrupted each time step, making the phrase timeout slightly inaccurate and most importantly, it meant that the infinite loop wasn't being slept whenever there wasn't data in the queue, which makes it keep running with no pause --- transcribe_demo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transcribe_demo.py b/transcribe_demo.py index 9d370d2..6ea633c 100644 --- a/transcribe_demo.py +++ b/transcribe_demo.py @@ -128,7 +128,7 @@ def main(): print(line) # Flush stdout. print('', end='', flush=True) - + else: # Infinite loops are bad for processors, must sleep. sleep(0.25) except KeyboardInterrupt: