Spaces:
Sleeping
Sleeping
Update tools/asr_tool.py
Browse files12345678from faster_whisper import WhisperModelimport osmodel = WhisperModel("small", device="cpu", compute_type="int8")def transcribe_audio(audio_path: str) -> str:segments, _ = model.transcribe(audio_path)return " ".join(segment.text for segment in segments)1234567from faster_whisper import WhisperModelmodel = WhisperModel("base", device="cpu", compute_type="int8")def transcribe_audio(audio_path: str) -> str:segments, _ = model.transcribe(audio_path)return " ".join(segment.text.strip() for segment in segments)
tools/asr_tool.py+2-3