Changes ;)
[kiosk.git] / listen.py
index 11a4db33f58d76b4a1f5a7b4a8b9a4fa6d982e46..70d19855df1b0307a835924f874bdadb99758867 100755 (executable)
--- 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()