Skip to main content

A Python package for the whisper.cpp CLI.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whisper_cpp_cli-0.0.3.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distributions

whisper_cpp_cli-0.0.3-py3-none-win_amd64.whl (364.1 kB view hashes)

Uploaded Python 3 Windows x86-64

whisper_cpp_cli-0.0.3-py3-none-win32.whl (300.2 kB view hashes)

Uploaded Python 3 Windows x86

whisper_cpp_cli-0.0.3-py3-none-musllinux_1_1_x86_64.whl (1.1 MB view hashes)

Uploaded Python 3 musllinux: musl 1.1+ x86-64

whisper_cpp_cli-0.0.3-py3-none-musllinux_1_1_ppc64le.whl (1.3 MB view hashes)

Uploaded Python 3 musllinux: musl 1.1+ ppc64le

whisper_cpp_cli-0.0.3-py3-none-musllinux_1_1_i686.whl (1.2 MB view hashes)

Uploaded Python 3 musllinux: musl 1.1+ i686

whisper_cpp_cli-0.0.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (589.0 kB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

whisper_cpp_cli-0.0.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (714.8 kB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64le

whisper_cpp_cli-0.0.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (631.0 kB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ i686

whisper_cpp_cli-0.0.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (569.7 kB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

whisper_cpp_cli-0.0.3-py3-none-macosx_11_0_arm64.whl (523.1 kB view hashes)

Uploaded Python 3 macOS 11.0+ ARM64

whisper_cpp_cli-0.0.3-py3-none-macosx_10_12_x86_64.whl (599.0 kB view hashes)

Uploaded Python 3 macOS 10.12+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page