mirror of
https://github.com/charliermarsh/whisper.cpp-cli.git
synced 2025-12-05 19:06:50 -06:00
main
Seemed like a fitting repo to try `build[uv]` on. :)
whisper.cpp-cli
A Python wrapper around the whisper.cpp CLI.
Packages whisper.cpp into pre-built, pip-installable
wheels, for macOS and Linux.
Installation
Available on PyPI, with pre-built wheels for macOS and Linux:
pip install whisper.cpp-cli
Once installed, whisper-cpp will be exposed as a command-line tool:
whisper-cpp --help
Usage
Following 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.wav
And transcribe audio, as follows:
whisper-cpp -m ggml-large-v3-q5_0.bin input.wav --output-txt
Development
whisper.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.
License
MIT
Languages
Python
63.9%
CMake
36.1%