Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-emanuilov/whispercpp_kit
A wrapper on whisper.cpp with additional helper features like model management capabilities.
https://github.com/s-emanuilov/whispercpp_kit
asr whisper
Last synced: 11 days ago
JSON representation
A wrapper on whisper.cpp with additional helper features like model management capabilities.
- Host: GitHub
- URL: https://github.com/s-emanuilov/whispercpp_kit
- Owner: s-emanuilov
- License: other
- Created: 2024-12-11T06:14:52.000Z (13 days ago)
- Default Branch: main
- Last Pushed: 2024-12-11T10:39:57.000Z (13 days ago)
- Last Synced: 2024-12-11T11:36:05.644Z (13 days ago)
- Topics: asr, whisper
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WhisperCPP Kit ๐๏ธ
[![PyPI version](https://badge.fury.io/py/whispercpp-kit.svg)](https://badge.fury.io/py/whispercpp-kit)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)> ๐ A Python wrapper around [whisper.cpp](https://github.com/ggerganov/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
```bash
sudo apt update
sudo apt install git cmake ffmpeg build-essential
```MacOS
```bash
brew install git cmake ffmpeg gcc make
```CentOS/RHEL
```bash
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
```bash
pip install whispercpp_kit
```### Basic usage
```python
from whispercpp_kit import WhisperCPP# Initialize with default model
whisper = WhisperCPP(model_name="tiny.en")# Transcribe audio
text = whisper.transcribe("audio.mp3")
print(text)
```### Advanced configuration
```python
# 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
```## ๐ณ Docker support
Docker Instructions
```bash
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](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.
##