is r.pause_threshold defined one time or every listen

in many voice recognition codes i can see that pause_threshold is configured inside while loop
i believe it should be defined only once outside the while true loop? isn’t it ?

while True:
if working == True:

        with sr.Microphone() as source: 
        
            r.pause_threshold=0.5
            audio = r.listen(source)
            queue.put(audio)
            

Leave a Comment