Download model_whisper.py from KateProxa/TG_bot: direct link, hf CLI and curl.
- Browser
- Download file 248 Bytes
-
https://huggingface.co/spaces/KateProxa/TG_bot/resolve/main/model_whisper.py
- Command line
-
hf download hf://spaces/KateProxa/TG_bot/model_whisper.py
-
curl -L -o model_whisper.py https://huggingface.co/spaces/KateProxa/TG_bot/resolve/main/model_whisper.py
248 Bytes
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| # In[ ]: | |
| import whisper | |
| model = whisper.load_model('small') | |
| result = model.transcribe('audio_6.ogg', fp16=False) # добавляем аудио для обработки | |
| print(result['text']) | |