X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=listen.py;h=70d19855df1b0307a835924f874bdadb99758867;hb=5c39d86ebc075ccb7be98b1dfab8040b72ff9134;hp=11a4db33f58d76b4a1f5a7b4a8b9a4fa6d982e46;hpb=0bee476055b15d8de59c74b61e5c56f214b83941;p=kiosk.git diff --git a/listen.py b/listen.py index 11a4db3..70d1985 100755 --- a/listen.py +++ b/listen.py @@ -77,13 +77,10 @@ class HotwordListener(object): sample_rate = porcupine.sample_rate, sample_width = 2, # 16 bits ) - try: - command = recognizer.recognize_google(speech) - print('[%s] >>>>>>>>>>>>> Google says command was %s' % ( - str(datetime.now()), command) - ) - except Exception: - command = 'weather' + command = recognizer.recognize_google(speech) + print('[%s] >>>>>>>>>>>>> Google says command was %s' % ( + str(datetime.now()), command) + ) self._queue.put(command) except Exception as e: @@ -117,6 +114,7 @@ def main(): keyword_paths = [pvporcupine.KEYWORD_PATHS[x] for x in ["blueberry", "bumblebee"]] sensitivities = [0.85, 0.95] HotwordListener( + [], keyword_paths, sensitivities, ).listen_forever()