added msg "listening"

This commit is contained in:
Mathieu 2021-08-28 16:13:47 +02:00
parent bbd211f6be
commit bc8897843d

View File

@ -45,6 +45,7 @@ def record():
r.adjust_for_ambient_noise(source=source, duration=0.7) r.adjust_for_ambient_noise(source=source, duration=0.7)
try: try:
print("Listening...")
audio = r.listen(source, timeout=2, phrase_time_limit=5) audio = r.listen(source, timeout=2, phrase_time_limit=5)
except sr.WaitTimeoutError: except sr.WaitTimeoutError:
print("Sentence timeout") print("Sentence timeout")