Download utils/stt.py from arm-inas/AutoDub: direct link, hf CLI and curl.
- Browser
- Download file 154 Bytes
-
https://huggingface.co/spaces/arm-inas/AutoDub/resolve/main/utils/stt.py
- Command line
-
hf download hf://spaces/arm-inas/AutoDub/utils/stt.py
-
curl -L -o stt.py https://huggingface.co/spaces/arm-inas/AutoDub/resolve/main/utils/stt.py
154 Bytes
| import whisper | |
| model = whisper.load_model("base") | |
| def transcribe_audio(audio_path): | |
| result = model.transcribe(audio_path) | |
| return result["text"] | |