Skip to content

Audio: MFCC: Add Voice Activity Detection based on Mel spectrum#10782

Draft
singalsu wants to merge 1 commit into
thesofproject:mainfrom
singalsu:mfcc_add_vad
Draft

Audio: MFCC: Add Voice Activity Detection based on Mel spectrum#10782
singalsu wants to merge 1 commit into
thesofproject:mainfrom
singalsu:mfcc_add_vad

Conversation

@singalsu
Copy link
Copy Markdown
Collaborator

This patch adds a new mfcc_vad module that implements VAD operating on the Mel log spectrum values produced by the MFCC component. The VAD is very simple and is not very selective for voice vs. other signals. But the continuously updated background noise estimate prevents stationary noises to trigger the VAD.

The algorithm tracks a per-bin noise floor (instant-down, slow-rise) and computes a A-weighted energy delta. The used weight emphasizes speech frequencies. Speech is declared when the delta exceeds a threshold (0.30 in Q9.23) with a 20-frame hangover to prevent rapid toggling.

The VAD flag is inserted into the output stream as the first value after the magic header word in all format paths (S16, S24, S32).

A new Kconfig option CONFIG_COMP_MFCC_VAD (depends on COMP_MFCC, default n) gates compilation of the VAD code and the stream format change.

This patch adds a new mfcc_vad module that implements VAD operating
on the Mel log spectrum values produced by the MFCC component. The
VAD is very simple and is not very selective for voice vs. other
signals. But the continuously updated background noise estimate
prevents stationary noises to trigger the VAD.

The algorithm tracks a per-bin noise floor (instant-down, slow-rise)
and computes a A-weighted energy delta. The used weight emphasizes
speech frequencies. Speech is declared when the delta exceeds a
threshold (0.30 in Q9.23) with a 20-frame hangover to prevent rapid
toggling.

The VAD flag is inserted into the output stream as the first value
after the magic header word in all format paths (S16, S24, S32).

A new Kconfig option CONFIG_COMP_MFCC_VAD (depends on COMP_MFCC,
default n) gates compilation of the VAD code and the stream format
change.

Signed-off-by: Seppo Ingalsuo <[email protected]>
@singalsu
Copy link
Copy Markdown
Collaborator Author

This is still WIP. I'd like to add a better audio feature header to the fake PCM stream. In successive PRs should start to use the compress PCM type for MFCC output data. The MFCC config blob could enable for VAD mode discontinuous data. E.g. once per second background noise Mel spectrum values, for speech detected at FFT hop rate, e.g. every 10 ms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant