XCORE SDK
XCORE Software Development Kit
vad_api.h
1 // Copyright 2022 XMOS LIMITED.
2 // This Software is subject to the terms of the XMOS Public Licence: Version 1.
3 
4 #ifndef _vad_h_
5 #define _vad_h_
6 
7 #include <stdint.h>
8 #include "vad_parameters.h"
9 #include "vad_mel.h"
10 
33 typedef struct {
35  int32_t old_features[VAD_N_OLD_FEATURES];
37  int32_t prev_frame[VAD_PROC_FRAME_LENGTH - VAD_FRAME_ADVANCE];
38 } vad_state_t;
39 
51 void vad_init(vad_state_t * state);
52 
71 uint8_t vad_probability_voice(const int32_t input[VAD_FRAME_ADVANCE],
72  vad_state_t * state);
73 
74 
75 #endif
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.
void vad_init(vad_state_t *state)
Function that initialises a VAD instance. Must be called before vad_probability_voice.
VAD state structure definition.
Definition: vad_api.h:33