10 lines
231 B
Python
10 lines
231 B
Python
import whisper
|
|
|
|
|
|
class VoiceRecognition:
|
|
@staticmethod
|
|
def recognition(audio):
|
|
model = whisper.load_model("base")
|
|
result = model.transcribe(audio)
|
|
print(result["text"])
|
|
return result["text"]
|