super cool fix 2

This commit is contained in:
Patrick_Pluto 2024-09-26 09:36:28 +02:00
parent 92d6688d64
commit 787c158be1

View file

@ -99,13 +99,13 @@ class API:
@self.app.route('/interstellar_ai/api/voice_recognition', methods=['POST']) @self.app.route('/interstellar_ai/api/voice_recognition', methods=['POST'])
def voice_recognition(): def voice_recognition():
recognition_type = request.args.get('type') type = request.args.get('type')
audio = request.args.get('audio') audio = request.args.get('audio')
option = request.args.get('option') option = request.args.get('option')
if recognition_type == "basic": if type == "basic":
text = self.voice.basic_recognition(audio, option) text = self.voice.basic_recognition(audio, option)
return jsonify({'status': 200, 'response': text}) return jsonify({'status': 200, 'response': text})
else:
return jsonify({'status': 401, 'response': "Invalid type"}) return jsonify({'status': 401, 'response': "Invalid type"})
@self.app.route('/interstellar_ai/api/weather', methods=['POST']) @self.app.route('/interstellar_ai/api/weather', methods=['POST'])