A Python wrapper around the whisper.cpp CLI.
Packages whisper.cpp into pre-built, pip-installable
wheels, for macOS and Linux.
Available on PyPI, with pre-built wheels for macOS and Linux:
pip install whisper.cpp-cliOnce installed, whisper-cpp will be exposed as a command-line tool:
whisper-cpp --helpFollowing Simon Willison's Transcribing MP3s with whisper-cpp on macOS, once installed, you can download a Whisper model file:
curl -o ggml-large-v3-q5_0.bin -L 'https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-q5_0.bin?download=true'Convert from MP3 to 16kHz WAV, if necessary:
ffmpeg -i input.mp3 -ar 16000 input.wavAnd transcribe audio, as follows:
whisper-cpp -m ggml-large-v3-q5_0.bin input.wav --output-txtwhisper.cpp is compiled without any CPU or GPU
acceleration.
In the future, I'd like to distribute builds with
Core ML support,
CUDA support, and
more, given whisper.cpp's own support for these
features.
The latest release compiles against v1.5.5.
MIT