very good documentation
This commit is contained in:
parent
b3c03149fe
commit
cb6298476a
5 changed files with 40 additions and 19 deletions
|
@ -94,6 +94,8 @@ class API:
|
|||
return jsonify({'status': 200, 'response': self.db.change_data(data)})
|
||||
elif action == "check_credentials":
|
||||
return jsonify({'status': 200, 'response': self.db.check_credentials(data)})
|
||||
elif action == "delete_account":
|
||||
return jsonify({'status': 200, 'response': self.db.delete_user(data)})
|
||||
|
||||
return jsonify({'status': 401, 'response': "Invalid action"})
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import io
|
||||
import numpy as np
|
||||
from faster_whisper import WhisperModel
|
||||
from pydub import AudioSegment
|
||||
|
||||
|
@ -19,7 +18,7 @@ class VoiceRecognition:
|
|||
print("audio to wav failed")
|
||||
|
||||
model_size = "base"
|
||||
model = WhisperModel(model_size, device="cpu", compute_type="int8")
|
||||
model = WhisperModel(model_size, device="cpu", compute_type=" ")
|
||||
|
||||
segments, _ = model.transcribe(wav_io)
|
||||
transcription = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue