From 63d1dc3b6296a72eab17627b0ae3327a6e8c4991 Mon Sep 17 00:00:00 2001 From: Samantha Grey <49354894+sammygrey@users.noreply.github.com> Date: Thu, 12 Dec 2024 22:59:35 -0500 Subject: [PATCH] Fix phrase patching and utcnow deprecation warning --- transcribe_demo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transcribe_demo.py b/transcribe_demo.py index 6ea633c..0643220 100644 --- a/transcribe_demo.py +++ b/transcribe_demo.py @@ -91,7 +91,7 @@ def record_callback(_, audio:sr.AudioData) -> None: while True: try: - now = datetime.utcnow() + now = datetime.now() # Pull raw recorded audio from the queue. if not data_queue.empty(): phrase_complete = False @@ -120,7 +120,7 @@ def record_callback(_, audio:sr.AudioData) -> None: if phrase_complete: transcription.append(text) else: - transcription[-1] = text + transcription[-1] = transcription[-1] + text # Clear the console to reprint the updated transcription. os.system('cls' if os.name=='nt' else 'clear')