File size: 201 Bytes
dbbd3ec
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import whisper

model = whisper.load_model("base")

def transcribe_audio(audio_path: str):

    result = model.transcribe(audio=audio_path)

    text = result["text"].strip()

    return text