Skip to main content

Crate silero_vad_crs

Crate silero_vad_crs 

Source
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§

SileroVad
Owns one native Silero VAD model instance.
SpeechTimestamp
A detected speech segment.
SpeechTimestampSeconds
A detected speech segment expressed in seconds.
TimestampConfig
Tuning options for get_timestamps_from_probs.

Enums§

SileroVadError
Errors returned by the safe Rust wrapper.
SileroVadStatus
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.