SimpleEnergyVAD class

Simple energy-based Voice Activity Detection Based on iOS WhisperKit's EnergyVAD implementation but simplified for real-time audio processing

Constructors

SimpleEnergyVAD({int sampleRate = 16000, double frameLength = 0.1, double energyThreshold = 0.005})
Initialize the VAD with specified parameters

Properties

energyThreshold double
Energy threshold for voice activity detection (0.0 to 1.0)
getter/setter pair
frameLength double
Frame length in seconds
no setter
frameLengthSamples int
Length of each analysis frame in samples
final
hashCode int
The hash code for this object.
no setterinherited
isReady bool
no setter
isSpeechActive bool
Current speech activity state
no setter
onAudioBuffer ↔ void Function(List<int>)?
Optional callback for processed audio buffers
getter/setter pair
onSpeechActivity ↔ void Function(SpeechActivityEvent)?
Speech activity callback
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampleRate int
Sample rate of the audio (typically 16000 Hz)
final

Methods

cleanup() Future<void>
initialize({String? modelPath}) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyTTSDidFinish() → void
Notify VAD that TTS has finished
notifyTTSWillStart() → void
Notify VAD that TTS is about to start
pause() → void
Pause VAD processing
process(List<int> audioData) Future<VADResult>
processAudioBuffer(List<int> buffer) → void
Process an audio buffer for voice activity detection
reset() → void
Reset the VAD state
resume() → void
Resume VAD processing
start() → void
Start voice activity detection
startCalibration() Future<void>
Start automatic calibration
stop() → void
Stop voice activity detection
toString() String
A string representation of this object.
inherited

Operators

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