VadPlusBindings class

Bindings for src/vad_plus.h.

Regenerate bindings with dart run ffigen --config ffigen.yaml.

Constructors

VadPlusBindings(DynamicLibrary dynamicLibrary)
The symbols are looked up in dynamicLibrary.
VadPlusBindings.fromLookup(Pointer<T> lookup<T extends NativeType>(String symbolName))
The symbols are looked up with lookup.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
vad_config_default(Pointer<VADConfig> config_out) → void
Create default VAD configuration for Silero VAD Fills the provided config struct with default values
vad_create() Pointer<VADHandle>
Create a new VAD instance
vad_destroy(Pointer<VADHandle> handle) → void
Destroy a VAD instance and free resources
vad_float_to_pcm16(Pointer<Float> float_samples, Pointer<Int16> pcm16_samples, int sample_count) → void
Convert float32 audio samples to PCM16
vad_force_end_speech(Pointer<VADHandle> handle) → void
Force end current speech segment
vad_get_last_error(Pointer<VADHandle> handle) Pointer<Char>
Get the last error message
vad_init(Pointer<VADHandle> handle, Pointer<VADConfig> config, Pointer<Char> model_path) int
Initialize VAD with configuration and model
vad_invalidate_callback(Pointer<VADHandle> handle) → void
Invalidate the callback to prevent it from being invoked. This MUST be called before closing the Dart NativeCallable to prevent crashes.
vad_is_speaking(Pointer<VADHandle> handle) bool
Check if VAD is currently detecting speech Returns 1 if speaking, 0 otherwise
vad_pcm16_to_float(Pointer<Int16> pcm16_samples, Pointer<Float> float_samples, int sample_count) → void
Convert PCM16 audio samples to float32
vad_process_audio(Pointer<VADHandle> handle, Pointer<Float> samples, int sample_count) int
Process audio samples directly
vad_reset(Pointer<VADHandle> handle) → void
Reset VAD state
vad_set_callback(Pointer<VADHandle> handle, Pointer<NativeFunction<VADEventCallbackNative>> callback, Pointer<Void> user_data) → void
Set the event callback for VAD events
vad_start(Pointer<VADHandle> handle) int
Start audio capture and VAD processing
vad_stop(Pointer<VADHandle> handle) → void
Stop audio capture and VAD processing

Operators

operator ==(Object other) bool
The equality operator.
inherited