forgot return when sentence timout at recording

This commit is contained in:
Mathieu 2021-08-28 16:07:28 +02:00
parent dbb6ba48ea
commit bbd211f6be

View File

@ -48,9 +48,13 @@ def record():
audio = r.listen(source, timeout=2, phrase_time_limit=5)
except sr.WaitTimeoutError:
print("Sentence timeout")
return
threading.Thread(
target=sa.WaveObject.from_wave_file(os.getcwd() + "/jarvis" + "/sounds/" + "listened.wav").play).start()
if audio.frame_data:
server_utils.send_record_to_server(audio.frame_data)