lib_vad API Functions¶
-
void vad_init(vad_state_t *state)¶
Function that initialises a VAD instance. Must be called before vad_probability_voice.
- Parameters
state[inout] – Pointer to a vad_state_t state structure
-
uint8_t vad_probability_voice(const int32_t input[VAD_FRAME_ADVANCE], vad_state_t *state)¶
Function that classifies whether the recent set of samples contains voice.
- Parameters
input[in] – Array of samples sampled in the time domain It should contain VAD_FRAME_ADVANCE new samples since the last call
state[inout] – Reference to the state stucture. Should be declared as vad_state_t state. Prior to calling the funciton, the state must have been initialised with vad_init().
- Returns
A number from 0 to 255, where 0 indicates very likely not voice, and 255 indicates very likely voice