Send recording message after playing recording sound

This allows the sound to play before any ducking starts
pull/2273/head
Åke Forslund 2019-08-26 15:09:01 +02:00
parent 73dc548bed
commit 4ae290d5b1
1 changed files with 3 additions and 2 deletions

View File

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