forked from React-Group/interstellar_ai
		
	whisper is better
This commit is contained in:
		
							parent
							
								
									8cc9b1b015
								
							
						
					
					
						commit
						ab12b796ec
					
				
					 2 changed files with 9 additions and 50 deletions
				
			
		
							
								
								
									
										11
									
								
								py/api.py
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								py/api.py
									
										
									
									
									
								
							|  | @ -99,16 +99,9 @@ class API: | |||
| 
 | ||||
|         @self.app.route('/interstellar_ai/api/voice_recognition', methods=['POST']) | ||||
|         def voice_recognition(): | ||||
|             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: | ||||
|                 return jsonify({'status': 401, 'response': "Invalid type"}) | ||||
|             text = self.voice.recognition(audio) | ||||
|             return jsonify({'status': 200, 'response': text}) | ||||
| 
 | ||||
|         @self.app.route('/interstellar_ai/api/weather', methods=['POST']) | ||||
|         def get_weather(): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Patrick_Pluto
						Patrick_Pluto