Expand description
Safe Rust wrapper around the vendored Silero VAD C implementation.
The C files are compiled into this crate by build.rs, so a Rust program
using this crate does not need to ship or locate a separate .dll, .so,
or .dylib at runtime.
Structs§
- Silero
Vad - Owns one native Silero VAD model instance.
- Speech
Timestamp - A detected speech segment.
- Speech
Timestamp Seconds - A detected speech segment expressed in seconds.
- Timestamp
Config - Tuning options for
get_timestamps_from_probs.
Enums§
- Silero
VadError - Errors returned by the safe Rust wrapper.
- Silero
VadStatus - Status values returned by the C API.
Constants§
- DEFAULT_
CHUNK_ SAMPLES - Number of fresh samples consumed per normal streaming step.
- DEFAULT_
CONTEXT_ SAMPLES - Number of previous samples prepended to each streaming chunk.
- DEFAULT_
INPUT_ SAMPLES - Total input samples expected by the low-level C chunk function.
- SAMPLE_
RATE - The native Silero VAD model sample rate.
Functions§
- audio_
probability_ count - Return how many probability values the C model will produce for
audio_samples. - audio_
probability_ count_ for_ sample_ rate - Return how many probability values the model will produce at
sampling_rate. - get_
timestamps_ from_ probs - Convert frame-level speech probabilities into speech timestamps.
- get_
timestamps_ from_ probs_ seconds - Convert frame-level speech probabilities into speech timestamps in seconds.
- get_
timestamps_ from_ probs_ seconds_ with_ config - Convert frame-level speech probabilities into speech timestamps in seconds.
- get_
timestamps_ from_ probs_ with_ config - Convert frame-level speech probabilities into speech timestamps with custom options.
- source_
window_ samples_ for_ sample_ rate - Return source-rate samples represented by one output probability step.