From 9ecc380a339b3b84d911fb35ef4aed654bd8c185 Mon Sep 17 00:00:00 2001 From: Duane King Date: Fri, 24 Nov 2023 14:51:44 -0800 Subject: [PATCH] remove last_sample as its now dead code --- transcribe_demo.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/transcribe_demo.py b/transcribe_demo.py index 3e8b650..ee9e3b2 100644 --- a/transcribe_demo.py +++ b/transcribe_demo.py @@ -36,8 +36,6 @@ def main(): # The last time a recording was retrieved from the queue. phrase_time = None - # Current raw audio bytes. - last_sample = bytes() # Thread safe Queue for passing data from the threaded recording callback. data_queue = Queue() # We use SpeechRecognizer to record our audio because it has a nice feature where it can detect when speech ends. @@ -103,7 +101,6 @@ def main(): # If enough time has passed between recordings, consider the phrase complete. # Clear the current working audio buffer to start over with the new data. if phrase_time and now - phrase_time > timedelta(seconds=phrase_timeout): - last_sample = bytes() phrase_complete = True # This is the last time we received new audio data from the queue. phrase_time = now