Vedio-Summerizer / utils /transcriber.py
Omkar1872's picture
Update utils/transcriber.py
7776f45 verified
raw
history blame contribute delete
334 Bytes
import whisper
def transcribe_audio(file_path: str) -> str:
"""
Transcribe an audio/video file using local Whisper model.
"""
# Load small model for faster processing (you can use "base", "medium", or "large")
model = whisper.load_model("small")
result = model.transcribe(file_path)
return result["text"]