Low-level Rustler bindings to whisper.cpp via the whisper-rs crate.
This module is private to the library. Use WhisperCpp for the public
API. Stub names must match the Rust NIF symbols verbatim (Rustler
verifies arity at module load time); user-friendly wrappers live below
them.
Summary
Functions
Returns true once an abort handle has been signalled.
Signals an abort handle; in-flight transcribes observing it return early.
Reports the active runtime backends compiled into this NIF artefact.
Loads a GGUF/GGML whisper.cpp model file.
Returns loaded-model metadata.
Mints a fresh cooperative-cancellation handle.
Runs whisper.cpp on a buffer of PCM samples.
Functions
Returns true once an abort handle has been signalled.
@spec abort_handle_signal(reference()) :: :ok
Signals an abort handle; in-flight transcribes observing it return early.
Reports the active runtime backends compiled into this NIF artefact.
Loads a GGUF/GGML whisper.cpp model file.
Returns loaded-model metadata.
@spec new_abort_handle() :: reference()
Mints a fresh cooperative-cancellation handle.
@spec transcribe(reference(), binary(), map(), reference() | nil, pid() | nil) :: {:ok, map()} | {:error, map()}
Runs whisper.cpp on a buffer of PCM samples.
samples_bin is a binary of little-endian f32 mono samples at 16 kHz.
abort_handle is either nil or an opaque resource minted by
new_abort_handle/0; signalling it from another process cancels
in-flight inference. progress_pid is nil or a pid that receives
{:whisper_progress, percent} messages as work advances.