From 14ffb06c658482ecfce8c8865bade0182509732a Mon Sep 17 00:00:00 2001 From: Dody Suria Wijaya Date: Tue, 4 Apr 2017 14:05:14 -0500 Subject: [PATCH] phrase_time_limit was ignored on listen_in_background call --- speech_recognition/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speech_recognition/__init__.py b/speech_recognition/__init__.py index cddfbee4..4e722e22 100644 --- a/speech_recognition/__init__.py +++ b/speech_recognition/__init__.py @@ -615,7 +615,7 @@ def threaded_listen(): with source as s: while running[0]: try: # listen for 1 second, then check again if the stop function has been called - audio = self.listen(s, 1) + audio = self.listen(s, 1, phrase_time_limit) except WaitTimeoutError: # listening timed out, just try again pass else: