Một mục mã nguồn mở trong kho dữ liệu GitHub của TopGit: Vaibhavs10/insanely-fast-whisper, 13.1k sao, Jupyter Notebook.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
An opinionated CLI to transcribe Audio files w/ Whisper on-device! Powered by 🤗 Transformers, Optimum & flash-attn
TL;DR - Transcribe 150 minutes (2.5 hours) of audio in less than 98 seconds - with OpenAI's Whisper Large v3. Blazingly fast transcription is now a reality!⚡️
P.S. We also ran the benchmarks on a Google Colab T4 GPU instance too!
P.P.S. This project originally started as a way to showcase benchmarks for Transformers, but has since evolved into a lightweight CLI for people to use. This is purely community driven. We add whatever community seems to have a strong demand for!
🆕 Blazingly fast transcriptions via your terminal! ⚡️
We've added a CLI to enable fast transcriptions. Here's how you can use it:
Install insanely-fast-whisper with pipx (pip install pipx or brew install pipx):
pipx install insanely-fast-whisper
⚠️ If you have python 3.11.XX installed, pipx may parse the version incorrectly and install a very old version of insanely-fast-whisper without telling you (version 0.0.8, which won't work anymore with the current BetterTransformers). In that case, you can install the latest version by passing --ignore-requires-python to pip:
If you're installing with pip, you can pass the argument directly: pip install insanely-fast-whisper --ignore-requires-python.
Run inference from any path on your computer:
insanely-fast-whisper --file-name <filename or URL>
Note: if you are running on macOS, you also need to add --device-id mps flag.
🔥 You can run Whisper-large-v3 w/ Flash Attention 2 from this CLI too:
insanely-fast-whisper --file-name <filename or URL> --flash True
🌟 You can run distil-whisper directly from this CLI too:
insanely-fast-whisper --model-name distil-whisper/large-v2 --file-name <filename or URL>
Don't want to install insanely-fast-whisper? Just use pipx run:
pipx run insanely-fast-whisper --file-name <filename or URL>
[!NOTE]
The CLI is highly opinionated and only works on NVIDIA GPUs & Mac. Make sure to check out the defaults and the list of options you can play around with to maximise your transcription throughput. Run insanely-fast-whisper --help or pipx run insanely-fast-whisper --help to get all the CLI arguments along with their defaults.
CLI Options
The insanely-fast-whisper repo provides an all round support for running Whisper in various settings. Note that as of today 26th Nov, insanely-fast-whisper works on both CUDA and mps (mac) enabled devices.
-h, --help show this help message and exit
--file-name FILE_NAME
Path or URL to the audio file to be transcribed.
--device-id DEVICE_ID
Device ID for your GPU. Just pass the device number when using CUDA, or "mps" for Macs with Apple Silicon. (default: "0")
--transcript-path TRANSCRIPT_PATH
Path to save the transcription output. (default: output.json)
--model-name MODEL_NAME
Name of the pretrained model/ checkpoint to perform ASR. (default: openai/whisper-large-v3)
--task {transcribe,translate}
Task to perform: transcribe or translate to another language. (default: transcribe)
--language LANGUAGE
Language of the input audio. (default: "None" (Whisper auto-detects the language))
--batch-size BATCH_SIZE
Number of parallel batches you want to compute. Reduce if you face OOMs. (default: 24)
--flash FLASH
Use Flash Attention 2. Read the FAQs to see how to install FA2 correctly. (default: False)
--timestamp {chunk,word}
Whisper supports both chunked as well as word level timestamps. (default: chunk)
--hf-token HF_TOKEN
Provide a hf.co/settings/token for Pyannote.audio to diarise the audio clips
--diarization_model DIARIZATION_MODEL
Name of the pretrained model/ checkpoint to perform diarization. (default: pyannote/speaker-diarization)
--num-speakers NUM_SPEAKERS
Specifies the exact number of speakers present in the audio file. Useful when the exact number of participants in the conversation is known. Must be at least 1. Cannot be used together with --min-speakers or --max-speakers. (default: None)
--min-speakers MIN_SPEAKERS
Sets the minimum number of speakers that the system should consider during diarization. Must be at least 1. Cannot be used together with --num-speakers. Must be less than or equal to --max-speakers if both are specified. (default: None)
--max-speakers MAX_SPEAKERS
Defines the maximum number of speakers that the system should consider in diarization. Must be at least 1. Cannot be used together with --num-speakers. Must be greater than or equal to --min-speakers if both are specified. (default: None)
Frequently Asked Questions
How to correctly install flash-attn to make it work with insanely-fast-whisper?
Make sure to install it via pipx runpip insanely-fast-whisper install flash-attn --no-build-isolation. Massive kudos to @li-yifei for helping with this.
How to solve an AssertionError: Torch not compiled with CUDA enabled error on Windows?
The root cause of this problem is still unknown, however, you can resolve this by manually installing torch in the virtualenv like python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121. Thanks to @pto2k for all tdebugging this.
How to avoid Out-Of-Memory (OOM) exceptions on Mac?
The mps backend isn't as optimised as CUDA, hence is way more memory hungry. Typically you can run with --batch-size 4 without any issues (should use roughly 12GB GPU VRAM). Don't forget to set --device-id mps.
Đọc thêm về Vaibhavs10/insanely-fast-whisper ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/Vaibhavs10/insanely-fast-whisper là nguồn chính thức.
Vaibhavs10/insanely-fast-whisper có phải mã nguồn mở không?
Có — Vaibhavs10/insanely-fast-whisper phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/Vaibhavs10/insanely-fast-whisper.
Vaibhavs10/insanely-fast-whisper có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho Vaibhavs10/insanely-fast-whisper. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
Vaibhavs10/insanely-fast-whisper có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho Vaibhavs10/insanely-fast-whisper. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
Vaibhavs10/insanely-fast-whisper còn đang phát triển không?
Commit gần nhất trên Vaibhavs10/insanely-fast-whisper là 1.1 năm trước (theo timestamp GitHub). Repo có 953 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Vaibhavs10/insanely-fast-whisper dùng license gì?
Vaibhavs10/insanely-fast-whisper phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về insanely-fast-whisper?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về insanely-fast-whisper.