voice recognition trial 4
This commit is contained in:
parent
0c02d76d6f
commit
ea3fd09ea2
2 changed files with 14 additions and 9 deletions
10
py/api.py
10
py/api.py
|
@ -99,10 +99,12 @@ class API:
|
|||
|
||||
@self.app.route('/interstellar_ai/api/voice_recognition', methods=['POST'])
|
||||
def voice_recognition():
|
||||
type = request.args.get('type')
|
||||
audio = request.args.get('audio')
|
||||
option = request.args.get('option')
|
||||
if type == "basic":
|
||||
print(request.args)
|
||||
recog_type = request.form.get('type')
|
||||
print(recog_type)
|
||||
audio = request.files.get('audio')
|
||||
option = request.form.get('option')
|
||||
if recog_type == "basic":
|
||||
text = self.voice.basic_recognition(audio, option)
|
||||
return jsonify({'status': 200, 'response': text})
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue