From fa23e396f1f5da5a16dd15c915f426b724a06dad Mon Sep 17 00:00:00 2001 From: bel Date: Sat, 1 Apr 2023 10:46:16 -0600 Subject: [PATCH] gr --- rust-whisper.d/hotwords.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rust-whisper.d/hotwords.py b/rust-whisper.d/hotwords.py index b13283b..14f98ad 100644 --- a/rust-whisper.d/hotwords.py +++ b/rust-whisper.d/hotwords.py @@ -80,8 +80,11 @@ class Reader(threading.Thread): time.sleep(5) log("Reader.run: error:", e) finally: - if mic: - mic.__exit__(None, None, None) + try: + if mic: + mic.__exit__(None, None, None) + except Exception: + pass self.outq.put(None) log("Reader.run: stop")