From 787c158be1ceaddbac0716b8dae308f71f721378 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Thu, 26 Sep 2024 09:36:28 +0200 Subject: [PATCH] super cool fix 2 --- py/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/py/api.py b/py/api.py index 52fe922..e152cdc 100644 --- a/py/api.py +++ b/py/api.py @@ -99,14 +99,14 @@ class API: @self.app.route('/interstellar_ai/api/voice_recognition', methods=['POST']) def voice_recognition(): - recognition_type = request.args.get('type') + type = request.args.get('type') audio = request.args.get('audio') option = request.args.get('option') - if recognition_type == "basic": + if type == "basic": text = self.voice.basic_recognition(audio, option) return jsonify({'status': 200, 'response': text}) - - return jsonify({'status': 401, 'response': "Invalid type"}) + else: + return jsonify({'status': 401, 'response': "Invalid type"}) @self.app.route('/interstellar_ai/api/weather', methods=['POST']) def get_weather():