forgot to return the error message (see previous commit)

This commit is contained in:
Mathieu 2021-08-28 16:13:01 +02:00
parent 63e37858cf
commit d5ce1ae7fd

View File

@ -37,7 +37,9 @@ def process_audio_request():
intent_manager.recognise(result_stt, request.headers.get('Client-Ip'), request.headers.get('Client-Port'))) intent_manager.recognise(result_stt, request.headers.get('Client-Ip'), request.headers.get('Client-Port')))
except sr.UnknownValueError: except sr.UnknownValueError:
print("[Error] No speech detected in the send audio!") error_msg = "[Error] No speech detected in the send audio!"
print(error_msg)
return jsonify(error_msg)
def get_data_in_request(flask_request): def get_data_in_request(flask_request):