File size: 280 Bytes
925719e |
1 2 3 4 5 6 7 8 9 10 11 |
import whisper
# Load Whisper model
asr_model = whisper.load_model("small")
def transcribe_audio(audio_path: str) -> str:
result = asr_model.transcribe(audio_path, language='en')
question = result["text"]
print("Transcribed Question:", question)
return question
|