- logging_utils.register_thread_logging_prefix("watchdog:")
- while True:
- if hotword_thread is None or not hotword_thread.is_alive():
- if hotword_thread is None:
- logger.info("watchdog: Starting up the hotword detector thread...")
- else:
- logger.warning(
- "The hotword detector thread seems to have died; restarting it and hoping for the best."
+ with logging_utils.LoggingContext(logger, prefix="watchdog:"):
+ while True:
+ if hotword_thread is None or not hotword_thread.is_alive():
+ if hotword_thread is None:
+ logger.info("Starting up the hotword detector thread...")
+ else:
+ logger.warning(
+ "The hotword detector thread seems to have died; restarting it and hoping for the best."
+ )
+ keyword_paths = [pvporcupine.KEYWORD_PATHS[x] for x in ["bumblebee"]]
+ sensitivities = [0.7] * len(keyword_paths)
+ listener = listen.HotwordListener(
+ command_queue,
+ keyword_paths,
+ sensitivities,