pywhispercpp
Python bindings for whisper.cpp
What it is and what it does
pywhispercpp wraps the C++ implementation of OpenAI's Whisper speech recognition model, exposing it through a Python API. It downloads and caches models automatically, then transcribes audio files to text, returning segments with timing information. The package supports multiple backends (CUDA, CoreML, Vulkan, OpenBLAS, OpenVINO) via environment variables at install time, allowing optimization for different hardware. It depends on numpy, requests, tqdm, and platformdirs for core functionality.
You use it by instantiating a Model with a model name (e.g., 'base.en'), then calling transcribe() on an audio file path. The transcription runs locally without external API calls. Optional ffmpeg installation extends support beyond WAV to MP3, FLAC, and other formats. A CLI tool (pwcpp) and callback-based API enable both batch and streaming workflows.
Use it for:
- Transcribe audio files offline without sending data to cloud APIs, for privacy-sensitive applications
- Build a local speech-to-text service with GPU acceleration on supported hardware platforms
- Batch-process media files to generate subtitles (SRT, VTT) or transcripts in multiple output formats
- Integrate real-time transcription into Python applications via segment callbacks during inference
- Translate non-English audio to English text using the built-in translation capability
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pywhispercpp provides Python bindings for whisper.cpp, enabling speech-to-text transcription with support for multiple hardware accelerators and output formats.
Yes, if you need local, offline speech-to-text transcription. The package is actively maintained, has no known vulnerabilities, and offers broad hardware acceleration options. Install friction is moderate due to C++ compilation, but pre-built wheels ease setup for common platforms. The MIT license imposes no restrictions. Verify that pre-built wheels include the accelerator support you need, or be prepared to build from source with environment flags.
Install
pywhispercpp on PyPI
pip
pip install pywhispercppuv
uv add pywhispercpppoetry
poetry add pywhispercppInstalling pywhispercpp
Before you install
Medium install friction due to compiled C++ bindings; pre-built wheels cover multiple Python versions on Linux, macOS, and Windows, but source builds require a C++ toolchain. Optional ffmpeg dependency for non-WAV formats. Active maintenance with recent release.
License in practice
MIT license is permissive; you may use, modify, and distribute pywhispercpp freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pywhispercpp
from pywhispercpp.model import Model
model = Model('base.en')
segments = model.transcribe('file.wav')
for segment in segments:
print(segment.text)
ffmpeg must be installed on the system to transcribe non-WAV formats (MP3, FLAC, etc.); WAV files work without it. For GPU acceleration, CUDA, CoreML, or other backends must be installed before building from source.
Verify before relying
- Whether pre-built wheels include CUDA, CoreML, Vulkan, or other accelerator support, or if source builds are required for GPU/specialized hardware
- Actual transcription speed and accuracy compared to other Whisper implementations
- Memory footprint and latency characteristics for different model sizes
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 4 — numpy, requests, tqdm, platformdirs |
| Maintenance | actively maintained — 76 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 232,045/month — #9,076 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pywhispercpp-1.5.0-cp310-cp310-macosx_11_0_arm64.whl; pywhispercpp-1.5.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; pywhispercpp-1.5.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pywhispercpp-1.5.0-cp310-cp310-musllinux_1_2_aarch64.whl; pywhispercpp-1.5.0-cp310-cp310-musllinux_1_2_x86_64.whl; pywhispercpp-1.5.0-cp310-cp310-win32.whl; pywhispercpp-1.5.0-cp310-cp310-win_amd64.whl; pywhispercpp-1.5.0-cp311-cp311-macosx_11_0_arm64.whl; pywhispercpp-1.5.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; pywhispercpp-1.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pywhispercpp-1.5.0-cp311-cp311-musllinux_1_2_aarch64.whl; pywhispercpp-1.5.0-cp311-cp311-musllinux_1_2_x86_64.whl; pywhispercpp-1.5.0-cp311-cp311-win32.whl; pywhispercpp-1.5.0-cp311-cp311-win_amd64.whl; pywhispercpp-1.5.0-cp312-cp312-macosx_11_0_arm64.whl; pywhispercpp-1.5.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; pywhispercpp-1.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; pywhispercpp-1.5.0-cp312-cp312-musllinux_1_2_aarch64.whl; pywhispercpp-1.5.0-cp312-cp312-musllinux_1_2_x86_64.whl; pywhispercpp-1.5.0-cp312-cp312-win32.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
faster-whisperTranscribes audio to text using OpenAI's…
permissive · top 5,000 on PyPI
openai-whisperWhisper performs multilingual speech…
permissive · top 5,000 on PyPI
SpeechRecognitionPerforms speech recognition and transcription…
permissive · top 5,000 on PyPI
realtimesttRealtimeSTT converts speech from microphone or…
permissive · top 15,000 on PyPI
whisperxWhisperX performs fast automatic speech…
permissive · top 5,000 on PyPI
whisper-timestampedAdds word-level timestamps and confidence…
copyleft · top 15,000 on PyPI
voxcpmVoxCPM2 is a tokenizer-free text-to-speech…
permissive · top 15,000 on PyPI
gTTSgTTS converts text to speech using Google…
permissive · top 5,000 on PyPI
pymicro-vadA self-contained voice activity detector that…
permissive · top 15,000 on PyPI
llama-cpp-pythonPython bindings for llama.cpp that enable…
permissive · top 15,000 on PyPI