Last active
March 27, 2024 08:46
-
-
Save XueshiQiao/f91330e3a40a2f45f7e3674ecf234373 to your computer and use it in GitHub Desktop.
Run Whisper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# whisper https://github.com/openai/whisper | |
# 使用GPU做ASR,因为 1080 显存限制,使用medium比较合适(medium 使用约 5G 显存,大于 10G 显存可以用 large) | |
# T4 GPU,16G 显存,跑 meidum 时耗比大概 0.36(303 秒的音频用了 108s),显存占用 4.8G,显卡利用率在 85% 左右 | |
# --word_timestamps True --highlight_words True 显示 word-level 的时间戳(不加为 sentence-level) | |
whisper --model medium --language Chinese --verbose True --word_timestamps True --highlight_words True .\download.mp4 | |
# 使用 CPU | |
whisper --device cpu --threads 10 --model large --language Chinese --verbose True --word_timestamps True --highlight_words True .\download2.mp4 | |
# 使用 Docker | |
docker run -d --gpus all -p 9000:9000 -e ASR_MODEL=medium -e ASR_ENGINE=openai_whisper onerahmet/openai-whisper-asr-webservice:latest-gpu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment