In many voice recognition codes I can see that pause_threshold is configured inside a while loop.
I believe it should be defined only once outside the while True loop. Is that correct?
while True:
if working == True:
with sr.Microphone() as source:
r.pause_threshold=0.5
audio = r.listen(source)
queue.put(audio)