From e759c8ab33a9b9c5663eca790cf7f8a01918c206 Mon Sep 17 00:00:00 2001 From: Matthew Scholefield Date: Tue, 21 Jun 2016 12:15:58 -0500 Subject: [PATCH] Added back some SessionManager lines to replicate old behavior more precisely I'm not quiet sure where the session_id was ever used when emitted in the payload however just to be safe I kept it in there. This is to be sure there are no differences between the old and new listener that could be causing Cerberus problems. --- mycroft/client/speech/listener.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mycroft/client/speech/listener.py b/mycroft/client/speech/listener.py index 881fdb771a..77b190901c 100644 --- a/mycroft/client/speech/listener.py +++ b/mycroft/client/speech/listener.py @@ -119,6 +119,12 @@ class AudioConsumer(threading.Thread): self.metrics.increment("mycroft.wakeup") def process_audio(self, audio): + SessionManager.touch() + payload = { + 'utterance': self.mycroft_recognizer.key_phrase, + 'session': SessionManager.get().session_id, + } + self.emitter.emit("recognizer_loop:wakeword", payload) try: self.transcribe([audio]) except sr.UnknownValueError: # TODO: Localization