Fix UnboundLocalError in AudioProducer

==== Fixed Issues ====

====  Tech Notes ====
The variable should be declared outside the loop.
pull/2780/head
dalgwen 2020-12-15 10:16:34 +01:00
parent 6f8bae6ba1
commit 4747dd0e59
1 changed files with 1 additions and 0 deletions

View File

@ -621,6 +621,7 @@ class ResponsiveRecognizer(speech_recognition.Recognizer):
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)