Interface: VADType
Defined in: packages/react-native-executorch/src/types/vad.ts:34
React hook state and methods for managing a Voice Activity Detection (VAD) model instance.
Properties
downloadProgress
downloadProgress:
number
Defined in: packages/react-native-executorch/src/types/vad.ts:53
Represents the download progress as a value between 0 and 1.
error
error:
RnExecutorchError|null
Defined in: packages/react-native-executorch/src/types/vad.ts:38
Contains the error message if the VAD model failed to load or during processing.
isGenerating
isGenerating:
boolean
Defined in: packages/react-native-executorch/src/types/vad.ts:48
Indicates whether the model is currently processing an inference.
isReady
isReady:
boolean
Defined in: packages/react-native-executorch/src/types/vad.ts:43
Indicates whether the VAD model has successfully loaded and is ready for inference.
Methods
forward()
forward(
waveform):Promise<Segment[]>
Defined in: packages/react-native-executorch/src/types/vad.ts:61
Runs the Voice Activity Detection model on the provided audio waveform.
Parameters
waveform
Float32Array
The input audio waveform array.
Returns
Promise<Segment[]>
A promise resolving to an array of detected audio segments (e.g., timestamps for speech).
Throws
If the model is not loaded or is currently processing another request.