absadiki/pywhispercpp

Python bindings for whisper.cpp

What it solves

It provides a simple, Pythonic API for whisper.cpp, allowing developers to integrate high-performance speech-to-text transcription into Python applications without needing to interact with the underlying C++ implementation directly.

How it works

The project acts as Python bindings for the whisper.cpp engine. It allows users to load models (which are downloaded automatically or provided locally) and transcribe audio files (such as .wav or .mp3 via ffmpeg) into text segments. It supports various hardware acceleration backends including NVIDIA CUDA, CoreML, Vulkan, OpenBLAS, and OpenVINO.

Who it’s for

  • Python Developers: Those who want the efficiency of whisper.cpp with the ease of use of Python.
  • AI Assistant Builders: Developers creating voice-activated tools using the project's built-in assistant example and Voice Activity Detection (VAD).
  • End Users: People who want a simple CLI or GUI tool for transcribing audio files.

Highlights

  • Multi-Backend Support: Compatible with CUDA, CoreML, Vulkan, OpenBLAS, and OpenVINO for optimized performance.
  • Pythonic API: Simple Model class for transcription with support for custom callbacks for real-time processing.
  • Comprehensive Tooling: Includes a Command Line Interface (CLI), a PyQt5-based Graphical User Interface (GUI), and a voice assistant example.
  • Direct C-API Access: Advanced users can access the exposed C-APIs via the _pywhispercpp module.

Related

  • Project
  • Project
  • Project
  • Project
  • Project