crispasr-sys
Raw FFI bindings for CrispASR — lightweight on-device speech recognition via ggml.
This crate is the raw extern "C" FFI shim. Its build.rs builds libcrispasr
from source with cmake by default, or links a pre-built copy when
CRISPASR_LIB_DIR is set.
Install
On crates.io. build.rs needs either
the CrispASR C/C++ sources (to cmake libcrispasr) or a pre-built copy. To
build from source, depend via git so the sources are present:
[]
= { = "https://github.com/CrispStrobe/CrispASR" }
To use the crates.io release you must link a pre-built library, since the package does not vendor the sources — build/install it and set the linker path:
[]
= "0.8"
&& && &&
# e.g. /usr/local/lib
Prebuilt release bundle (no build)
The Releases page ships
relocatable libcrispasr-<platform>[-cuda|-vulkan].tar.gz bundles. Extract one
and point CRISPASR_SYS_LIB_DIR at its root — build.rs finds the import
lib and skips cmake. The bundle's tag must match the crate version (ABI); the
-cuda/-vulkan bundles carry the matching ggml backend libraries.
Linux / macOS — libs are flattened into lib/:
# runtime (if the rpath doesn't resolve after moving the bundle):
Windows — import libs live under src\Release\ (+ ggml\src\Release\) and
the DLLs under bin\, so set the linker dir and put bin\ on PATH for
runtime:
$env:CRISPASR_SYS_LIB_DIR = "C:\path\to\crispasr" # the folder with include\, src\, bin\
$env:PATH = "C:\path\to\crispasr\bin;$env:PATH" # crispasr.dll + ggml*.dll + cublas/cudart
cargo build
The legacy libwhisper alias also works:
For the safe high-level wrapper see the crispasr crate.
License
MIT — see LICENSE.