Spaces:
Sleeping
Sleeping
Update tools/asr_tool.py
Browse files1233456778from faster_whisper import WhisperModel
model = WhisperModel("base", device="cpu", compute_type="int8")model = WhisperModel("base", device="cpu")
def transcribe_audio(audio_path: str) -> str: segments, _ = model.transcribe(audio_path) return " ".join(segment.text.strip() for segment in segments) transcription = " ".join(segment.text for segment in segments) return transcription or "No transcription found."tools/asr_tool.py+3-2