![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
🚀 A Python wrapper around whisper.cpp with model management and helper features.
Before installing whispercpp_kit
, ensure you have these system-level dependencies:
git
cmake
ffmpeg
make
g++
/gcc
(C++ compiler)sudo apt update
sudo apt install git cmake ffmpeg build-essential
brew install git cmake ffmpeg gcc make
sudo yum update
sudo yum groupinstall "Development Tools"
sudo yum install git cmake ffmpeg gcc-c++ make
⚠️ Windows is currently not supported. Please use WSL (Windows Subsystem for Linux) with Ubuntu.
pip install whispercpp_kit
from whispercpp_kit import WhisperCPP
# Initialize with default model
whisper = WhisperCPP(model_name="tiny.en")
# First-time setup (automatically done on first transcribe)
whisper.setup()
# Transcribe audio
text = whisper.transcribe("audio.mp3")
print(text)
# Using standard models
whisper = WhisperCPP(
model_name="tiny.en",
num_threads=8, # Control threads number
verbose=True, # Enable verbose output
cache_dir="./cache" # Custom cache directory
)
# Using custom or fine-tuned models
whisper = WhisperCPP(model_path="/path/to/your/fine-tuned-model.bin")
# The library caches the built whisper.cpp source code
# This means subsequent runs will be faster as compilation is skipped
If you encounter issues with the whisper.cpp binary, you can force a rebuild:
import shutil
from whispercpp_kit import WhisperCPP
whisper = WhisperCPP(model_name="tiny.en")
# Force rebuild of whisper.cpp
shutil.rmtree(whisper.base_path)
whisper.setup()
Binary Deprecation Warning: If you see a warning about the 'main' binary being deprecated, rebuild whisper.cpp using the steps above. The latest version uses 'whisper-cli' instead.
Transcription Failures: Ensure you have all required dependencies installed and sufficient permissions to execute the binary.
Audio Format Issues: The library automatically converts audio files using ffmpeg. Make sure ffmpeg is properly installed if you encounter audio-related errors.
git clone https://github.com/s-emanuilov/whispercpp_kit
cd whispercpp_kit/examples/docker
# Build the image
docker build -t whispercpp_kit .
# Run with default model (base.en)
docker run -v $(pwd):/app/audio whispercpp_kit your_audio.mp3
# Using specific model
docker run -v $(pwd):/app/audio whispercpp_kit your_audio.mp3 tiny.en
See examples/docker/README.md for more details.
MIT License - feel free to use in your projects!
Contributions are welcome! Feel free to submit issues and pull requests.
FAQs
A toolkit for whisper.cpp with audio processing and model management
We found that whispercpp-kit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.