Skip to content

Packages whisper.cpp into pre-built, pip-installable wheels, for macOS and Linux.

License

Notifications You must be signed in to change notification settings

charliermarsh/whisper.cpp-cli

Repository files navigation

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

About

Packages whisper.cpp into pre-built, pip-installable wheels, for macOS and Linux.

Resources

License

Stars

Watchers

Forks