whispercpp  by aarnphm

Pybind11 bindings for whisper.cpp

created 2 years ago
334 stars

Top 83.3% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides Python bindings for the whisper.cpp library, enabling efficient speech-to-text transcription directly within Python environments. It targets developers and researchers who need to integrate Whisper's capabilities into their Python applications without the overhead of managing C++ dependencies manually. The primary benefit is simplified access to a highly optimized, C++-based ASR model from Python.

How It Works

The project utilizes Pybind11 to create Python bindings for the whisper.cpp C++ library. This approach allows direct exposure of C++ functions and classes to Python, offering near-native performance. It leverages a hermetic toolchain for building pre-built wheels across platforms, simplifying installation. The core functionality is accessed through a Whisper class, which can load models and perform transcription on NumPy arrays or directly from audio files.

Quick Start & Requirements

  • Install with pip: pip install whispercpp
  • For latest version from source: pip install git+https://github.com/aarnphm/whispercpp.git -vv
  • Requires Python. Pre-built wheels are provided, but local builds may require a C++ compiler.
  • Official examples: examples

Highlighted Details

  • Provides a Whisper class with from_pretrained and transcribe methods for easy model loading and inference.
  • Supports direct transcription from NumPy arrays and WAV files via transcribe_from_file.
  • Includes an experimental streaming transcription API (stream_transcribe).
  • Offers direct bindings to whisper.cpp's context and parameters via the api module.

Maintenance & Community

  • The project appears to be actively maintained by aarnphm.
  • No specific community links (Discord/Slack) or roadmap are mentioned in the README.

Licensing & Compatibility

  • The README does not explicitly state a license. The underlying whisper.cpp project is typically MIT licensed, but this specific binding's license should be verified.
  • Compatible with standard Python audio libraries like ffmpeg and librosa.

Limitations & Caveats

The experimental streaming API may have stability issues. The README does not detail performance benchmarks or specific hardware requirements beyond what whisper.cpp itself needs. The project's community support and long-term maintenance status are not clearly indicated.

Health Check
Last commit

7 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.