interstellar_ai/py/voice.py
2024-09-26 11:01:15 +02:00

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"]