SuperAPI AI Directory

insanely-fast-whisper

accelerates transcription with the combination of OpenAI's Whisper Large v2, HF Transformers, Optimum, and flash attention

Open website

About this tool

insanely-fast-whisper is a community-driven, opinionated command-line tool (CLI) for transcribing audio files locally on a device using the Whisper model. It is powered by Hugging Face Transformers, Optimum, and flash-attn, with the goal of achieving extremely fast transcription speeds.

Purpose: This tool is mainly used to quickly transcribe audio files into text. The official example shows that using OpenAI's Whisper Large v3 model, 150 minutes (2.5 hours) of audio can be transcribed in less than 98 seconds. The project was originally created to showcase Transformers benchmarks and later evolved into a lightweight CLI for community use.

Main capabilities:

  • Supports quickly transcribing audio files at any path via the command line.
  • Supports the Whisper Large v3 model and can run with Flash Attention 2.
  • Supports directly running distil-whisper models.
  • Provides multiple default options and adjustable parameters to maximize transcription throughput.
  • Supports CUDA (NVIDIA GPU) and mps (Mac) devices.

Usage: Installation: pipx is recommended for installation, with the command pipx install insanely-fast-whisper. If using Python 3.11.XX, pipx may incorrectly parse the version and install an older version (0.0.8). In this case, the latest version can be installed via the --ignore-requires-python parameter; when using pip, the same parameter can also be added: pip install insanely-fast-whisper --ignore-requires-python. Running: Run inference from any path on the computer. When running on macOS, the --device-id mps flag needs to be added additionally. Running Whisper-large-v3 with Flash Attention 2 enabled and running distil-whisper can both be done through this CLI. If you do not want to install it, you can also run it directly with pipx run. To view all CLI parameters and default values: run insanely-fast-whisper --help or pipx run insanely-fast-whisper --help.

Use cases: Suitable for users who need to quickly transcribe longer audio locally on a device, especially users with an NVIDIA GPU or Mac device. It is also suitable for developers who want to try different Whisper models (such as large-v3, distil-whisper) and optimization techniques (such as Flash Attention 2).

Limitations:

  • This CLI is opinionated and only supports NVIDIA GPUs and Mac devices.
  • On Mac, the mps backend optimization is not as good as CUDA, and memory consumption is greater. Usually --batch-size 4 can be used (requiring about 12GB GPU VRAM), and --device-id mps needs to be set.
  • On Windows, you may encounter the AssertionError: Torch not compiled with CUDA enabled error. The official solution is to manually install torch in a virtual environment: python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121。
  • To install flash-attn, use pipx runpip insanely-fast-whisper install flash-attn --no-build-isolation.
  • Regarding whether other platforms are supported, specific charging details, prices, etc., official information is not yet available.