burhan112's picture
Create asr.py
925719e verified
raw
history blame contribute delete
280 Bytes
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