Merge pull request #2331 from kwagyeman/kwabena/fix_microspeech

scripts/libraries: Add missing return in microspeech.listen().
This commit is contained in:
Ibrahim Abdelkader 2024-07-31 18:55:21 +02:00 committed by GitHub
commit 48fe3c1552
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -84,4 +84,5 @@ class MicroSpeech:
return (None, average_scores) return (None, average_scores)
if timeout != 0 and (time.ticks_ms() - stat_ms) > timeout: if timeout != 0 and (time.ticks_ms() - stat_ms) > timeout:
self.stop_audio_streaming() self.stop_audio_streaming()
return (None, average_scores)
time.sleep_ms(1) time.sleep_ms(1)