PHP binding for local speech-to-text, leveraging whisper.cpp
Top 83.3% on sourcepulse
This PHP library provides local speech-to-text capabilities by binding to whisper.cpp, offering a high-performance solution for automatic speech recognition and transcription. It targets PHP developers needing to integrate advanced ASR into their applications without relying on cloud APIs, simplifying model management and audio processing.
How It Works
The library leverages PHP's Foreign Function Interface (FFI) extension to directly interact with the C++ whisper.cpp library. This approach allows for efficient execution of the ASR models locally. It includes utilities for automatically downloading whisper.cpp models and a built-in audio reader that handles resampling and format conversion, abstracting away much of the complexity of the underlying C++ implementation.
Quick Start & Requirements
composer require codewithkyrian/whisper.php
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The ModelLoader
utility does not support quantized whisper.cpp models (e.g., q5, q8). Initial library use requires downloading shared libraries, which may add a small delay on the first execution.
6 months ago
1 day