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:
keyword_paths = [pvporcupine.KEYWORD_PATHS[x] for x in ["blueberry", "bumblebee"]]
sensitivities = [0.85, 0.95]
HotwordListener(
+ [],
keyword_paths,
sensitivities,
).listen_forever()