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.
pull/207/head
Matthew Scholefield 2016-06-21 12:15:58 -05:00
parent d9905a2d07
commit e759c8ab33
1 changed files with 6 additions and 0 deletions

View File

@ -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