forgot return when sentence timout at recording
This commit is contained in:
parent
dbb6ba48ea
commit
bbd211f6be
@ -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)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user