finally close reader

master
bel 2023-03-29 07:45:55 -06:00
parent eda12d9cb6
commit 0e278fffcb
1 changed files with 18 additions and 13 deletions

View File

@ -70,6 +70,7 @@ class Reader(threading.Thread):
def run(self):
log("Reader.run: start")
try:
idx = [
idx for idx,v in enumerate(
sr.Microphone.list_microphone_names(),
@ -82,6 +83,10 @@ class Reader(threading.Thread):
except Exception as e:
if not "timed out" in str(e):
log("Reader.run: error:", e)
except Exception as e:
log("Reader.run panic:", e)
log("microphones:", sr.Microphone.list_microphone_names())
finally:
self.outq.put(None)
log("Reader.run: stop")