From 4ae290d5b1fcb7d64be4e9439d04e9301f02e9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85ke=20Forslund?= Date: Mon, 26 Aug 2019 15:09:01 +0200 Subject: [PATCH] Send recording message after playing recording sound This allows the sound to play before any ducking starts --- mycroft/client/speech/mic.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mycroft/client/speech/mic.py b/mycroft/client/speech/mic.py index 47b609004c..2c30d56bca 100644 --- a/mycroft/client/speech/mic.py +++ b/mycroft/client/speech/mic.py @@ -561,8 +561,6 @@ class ResponsiveRecognizer(speech_recognition.Recognizer): return LOG.debug("Recording...") - emitter.emit("recognizer_loop:record_begin") - # If enabled, play a wave file with a short sound to audibly # indicate recording has begun. if self.config.get('confirm_listening'): @@ -576,6 +574,9 @@ class ResponsiveRecognizer(speech_recognition.Recognizer): # irrelevant after mute - play wav - unmute sequence ww_frames = None + # Notify system of recording start + emitter.emit("recognizer_loop:record_begin") + frame_data = self._record_phrase( source, sec_per_buffer,