承接 displace/ext-whisper 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

displace/ext-whisper

Composer 安装命令:

pie install displace/ext-whisper

包简介

PHP 8.3+ native, in-process speech-to-text via whisper.cpp: 16kHz WAV in, text + timestamped segments out.

README 文档

README

Local speech-to-text for PHP, in-process.
16kHz WAV in, text + timestamped segments out — no Python sidecar, no remote API, no audio leaving the box.

CI PHP 8.3 / 8.4 / 8.5 Pre-release MIT License Documentation

What is ext-whisper?

ext-whisper is a PHP 8.3+ extension that loads a whisper.cpp model and runs speech-to-text in the PHP process, on CPU. Written in Rust on top of ext-php-rs and whisper-rs.

  • 🎙️ Transcription with timestamps — full text plus time-aligned segments, offsets in seconds.
  • 🧾 Contracts-shaped output — segment rows match Displace\AI\Contracts\Transcriber exactly; the adapter is two lines.
  • 🧰 Actionable errors — a non-conforming WAV throws with the precise ffmpeg one-liner that fixes it.
  • 🌍 Multilingual + translate['language' => 'de'] hints, ['translate' => true] to English (multilingual models).
  • 🧵 Thread-safe by construction — one model handle, a fresh whisper state per call, no shared mutable state.
  • 🤫 Quiet by default — whisper.cpp's stderr firehose is silenced; EXT_WHISPER_LOG=1 restores it.

Quick start

mkdir -p models
curl -L -o models/ggml-tiny.en.bin \
    https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-tiny.en.bin

make build
php -d extension=$PWD/target/debug/libwhisper.so examples/transcribe.php \
    models/ggml-tiny.en.bin tests/fixtures/jfk.wav
<?php
use Displace\Whisper\Model;

$model  = Model::load('models/ggml-tiny.en.bin');
$result = $model->transcribe('audio/meeting.wav');

echo $result->text(), PHP_EOL;

foreach ($result->segments() as $s) {
    printf("[%6.2fs → %6.2fs] %s\n", $s['start'], $s['end'], $s['text']);
}

$model->close();

Input must be 16kHz mono 16-bit PCM WAV; everything else converts in one line (ffmpeg -i in.mp3 -ar 16000 -ac 1 -c:a pcm_s16le out.wav) and the error messages carry that exact command.

Documentation

whisper.displace.tech — install, audio preparation, the full API surface. Built from docs/ with mdbook, deployed on every push to main.

Part of a stack

Transcribe (ext-whisper) → chunk (ai-toolkit) → embed (ext-infer) → search (ext-turbovec): searchable audio archives, entirely on your hardware. The ai-contracts Transcriber interface is the integration surface.

Compatibility

macOS arm64 Linux x86_64 Linux arm64 Windows
PHP 8.3
PHP 8.4
PHP 8.5

Deliberately out of scope (v0.1)

Audio decoding (mp3/m4a/ogg — the ffmpeg one-liner is the API; symphonia-based decoding is a v0.2 candidate) · streaming / realtime transcription · speaker diarization · word-level timestamps · GPU-default builds (CPU-first platform-wide; use_gpu exists for custom builds) · Windows.

License

MIT © 2026 Eric Mann / Displace Technologies. Statically links whisper.cpp (MIT, © The ggml authors) — see THIRD-PARTY-NOTICES.md.

displace/ext-whisper 适用场景与选型建议

displace/ext-whisper 是一款 基于 Rust 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 06 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 displace/ext-whisper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 displace/ext-whisper 我们能提供哪些服务?
定制开发 / 二次开发

基于 displace/ext-whisper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 40
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Rust

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-11