@cap/whisper
v1.9.6
MIT
.cap
✓ Verified by capdux.org
whisper.cpp (v1.9.6) local speech-to-text (ASR) engine for CP via prebuilt dynamic library
Install with Cap
$ cap add @cap/whisper
AI Interface Stub .d.cp
No .d.cp AI interface stub published for this version.
README
Markdown@cap/whisper
High-performance local speech-to-text (ASR) engine for CP, powered by ggml-org/whisper.cpp (v1.9.6, MIT License) using prebuilt dynamic libraries (sys.whisper.prebuilt) with zero local C++ build time for consumers.
Architecture
- Prebuilt Dynamic Libraries: Links directly against
libwhisper.so+libggml*.so(prebuilt/<os>-<arch>/), preservingSONAMEsymlinks (libwhisper.so -> libwhisper.so.1 -> libwhisper.so.1.9.6,libggml.so*,libggml-base.so*,libggml-cpu.so*).cap runinjectsLD_LIBRARY_PATH/DYLD_LIBRARY_PATHautomatically. - Thin C ABI Shim (
c/whisper_ffi.c): ~45-line bridge isolating CP from version-sensitivewhisper_context_paramsstruct layout, compiled in <0.2s intolibwhisper_shim.a. - Zero-Leak RAII (
src/index.cp): ProvidesWhisperContext(withinitFromFile,isValid,nVocab, and deterministic~init()cleanup),versionString(),systemInfo(),langMaxId(),langId(code), andlangStr(id).
Building Prebuilt Binaries (Linux x86_64)
prebuilt/ is excluded from Git tracking. To build libwhisper.so and libggml*.so from upstream ggml-org/whisper.cpp (v1.9.6, MIT License):
git clone --depth 1 --branch v1.9.6 https://github.com/ggml-org/whisper.cpp.git /tmp/whisper.cpp
cmake -S /tmp/whisper.cpp -B /tmp/whisper.cpp/build -G Ninja \
-DBUILD_SHARED_LIBS=ON \
-DWHISPER_BUILD_TESTS=OFF \
-DWHISPER_BUILD_EXAMPLES=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DGGML_NATIVE=OFF
cmake --build /tmp/whisper.cpp/build -j$(nproc)
mkdir -p prebuilt/linux-x86_64
cp -a /tmp/whisper.cpp/build/src/libwhisper.so* /tmp/whisper.cpp/build/ggml/src/libggml*.so* prebuilt/linux-x86_64/
find prebuilt/linux-x86_64 -maxdepth 1 -type f -name "*.so*" -exec strip --strip-unneeded {} +
Quick Start
import { WhisperContext, versionString, systemInfo, langMaxId, langId, langStr } from "@cap/whisper";
import std from "std";
pub fn main(): void! {
std.debug.print("version={s} langMaxId={} zh={} en={} lang0={s}\n", .{
versionString(),
langMaxId(),
langId("zh"),
langId("en"),
langStr(0),
});
std.debug.print("systemInfo: {s}\n", .{systemInfo()});
}Version History
1 release| Version | Format / Size | Integrity (SHA-256) | Downloads | Published | Status |
|---|---|---|---|---|---|
| v1.9.6 | .cap · 43.6 KB | sha256-e90c095415bd0b78… | 0 | 2026-11-26 | latest |