Trigger actual transcription

This commit is contained in:
Tomasz Frątczak 2024-02-13 00:25:05 +01:00
parent 1483812c3b
commit 57803c0586
1 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,13 @@
import whisper
class Transcriber:
model = None
def __init__(self):
pass
self.model = whisper.load_model("base")
def execute(self, audio_file):
print("Transcribing audio file: " + audio_file)
result = self.model.transcribe(audio_file)
return result['text']