WhisperCPP Kit 🎙️
🚀 A Python wrapper around whisper.cpp with model management and helper features.
✨ Features
- 🔄 Automatic building and setup of whisper.cpp
- 🎯 Simple, intuitive Python API
- 🔧 Built-in model management
- 🚦 Clear error messages and dependency checks
- 🎵 Automatic audio format conversion
- 🧵 Multi-threading support
- 🐳 Docker support
- 🎯 Support for custom and fine-tuned models
- ⚡ Cached builds for faster subsequent inference
📋 System Requirements
Before installing whispercpp_kit
, ensure you have these system-level dependencies:
Required dependencies 🛠️
git
cmake
ffmpeg
make
g++
/gcc
(C++ compiler)- Build essentials
Installation commands 📦
Ubuntu/Debian
sudo apt update
sudo apt install git cmake ffmpeg build-essential
MacOS
brew install git cmake ffmpeg gcc make
CentOS/RHEL
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.
🚀 Quick start
Installation
pip install whispercpp_kit
Basic usage
from whispercpp_kit import WhisperCPP
whisper = WhisperCPP(model_name="tiny.en")
text = whisper.transcribe("audio.mp3")
print(text)
Advanced configuration
whisper = WhisperCPP(
model_name="tiny.en",
num_threads=8,
verbose=True,
cache_dir="./cache"
)
whisper = WhisperCPP(model_path="/path/to/your/fine-tuned-model.bin")
🐳 Docker support
Docker Instructions
git clone https://github.com/s-emanuilov/whispercpp_kit
cd whispercpp_kit/examples/docker
docker build -t whispercpp_kit .
docker run -v $(pwd):/app/audio whispercpp_kit your_audio.mp3
docker run -v $(pwd):/app/audio whispercpp_kit your_audio.mp3 tiny.en
See examples/docker/README.md for more details.
📝 License
MIT License - feel free to use in your projects!
🤝 Contributing
Contributions are welcome! Feel free to submit issues and pull requests.