Spaces:
Sleeping
Sleeping
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." | |