From 4747dd0e590601a3d4e9546574bf90e094396faa Mon Sep 17 00:00:00 2001 From: dalgwen Date: Tue, 15 Dec 2020 10:16:34 +0100 Subject: [PATCH] Fix UnboundLocalError in AudioProducer ==== Fixed Issues ==== ==== Tech Notes ==== The variable should be declared outside the loop. --- mycroft/client/speech/mic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mycroft/client/speech/mic.py b/mycroft/client/speech/mic.py index c3d4d092eade..028d682e8b48 100644 --- a/mycroft/client/speech/mic.py +++ b/mycroft/client/speech/mic.py @@ -621,6 +621,7 @@ def _wait_until_wake_word(self, source, sec_per_buffer): ww_frames = deque(maxlen=7) said_wake_word = False + audio_data = None while (not said_wake_word and not self._stop_signaled and not self._skip_wake_word()): chunk = self.record_sound_chunk(source)