Spaces:
Sleeping
Sleeping
File size: 300 Bytes
68f7e32 464e3d9 68f7e32 464e3d9 a4dc28d |
1 2 3 4 5 6 7 8 9 10 |
from faster_whisper import WhisperModel
model = WhisperModel("base", device="cpu")
def transcribe_audio(audio_path: str) -> str:
segments, _ = model.transcribe(audio_path)
transcription = " ".join(segment.text for segment in segments)
return transcription or "No transcription found."
|