|
Sound Open Firmware
|
Voice Activity Detection based on Mel spectrum energy. More...


Go to the source code of this file.
Data Structures | |
| struct | mfcc_vad_state |
| VAD state structure. More... | |
Macros | |
| #define | MFCC_VAD_NOISE_INIT_FRAMES 100 |
| Number of frames for fast noise floor convergence at startup (~1 s at 10 ms/frame). | |
| #define | MFCC_VAD_NOISE_RISE_ALPHA 98 |
| Slow noise floor rise coefficient in Q1.15 (0.003 * 2^15). | |
| #define | MFCC_VAD_NOISE_RISE_ALPHA_FAST 655 |
| Fast noise floor rise coefficient in Q1.15 (0.020 * 2^15). | |
| #define | MFCC_VAD_ENERGY_THRESHOLD 2516582 |
| Energy threshold for speech detection in Q9.23 (0.30 * 2^23). | |
| #define | MFCC_VAD_HANGOVER_FRAMES 20 |
| Hangover frame count to keep VAD active after last speech detection. | |
Functions | |
| int | mfcc_vad_init (struct mfcc_vad_state *vad, int num_mel_bins, int32_t sample_rate, struct processing_module *mod) |
| Initialize VAD state. | |
| int | mfcc_vad_update (struct mfcc_vad_state *vad, const int32_t *mel_log) |
| Process one Mel spectrum frame and update VAD decision. | |
Voice Activity Detection based on Mel spectrum energy.
This VAD operates on the Q9.23 Mel log spectrum values produced by the MFCC component. It tracks a per-bin noise floor that follows the signal downward instantly and rises slowly, then computes a speech-weighted energy delta above the floor.
| #define MFCC_VAD_ENERGY_THRESHOLD 2516582 |
Energy threshold for speech detection in Q9.23 (0.30 * 2^23).
| #define MFCC_VAD_HANGOVER_FRAMES 20 |
Hangover frame count to keep VAD active after last speech detection.
| #define MFCC_VAD_NOISE_INIT_FRAMES 100 |
Number of frames for fast noise floor convergence at startup (~1 s at 10 ms/frame).
| #define MFCC_VAD_NOISE_RISE_ALPHA 98 |
Slow noise floor rise coefficient in Q1.15 (0.003 * 2^15).
| #define MFCC_VAD_NOISE_RISE_ALPHA_FAST 655 |
Fast noise floor rise coefficient in Q1.15 (0.020 * 2^15).
| int mfcc_vad_init | ( | struct mfcc_vad_state * | vad, |
| int | num_mel_bins, | ||
| int32_t | sample_rate, | ||
| struct processing_module * | mod ) |
Initialize VAD state.
| [out] | vad | Pointer to VAD state to initialize. |
| [in] | num_mel_bins | Number of Mel bins. |
| [in] | sample_rate | Audio sample rate in Hz. |
| [in] | mod | Processing module for memory allocation. |
| int mfcc_vad_update | ( | struct mfcc_vad_state * | vad, |
| const int32_t * | mel_log ) |
Process one Mel spectrum frame and update VAD decision.
| [in,out] | vad | Pointer to VAD state. |
| [in] | mel_log | Mel log spectrum in Q9.23, array of num_mel_bins values. |