Skip to content

audio: mfcc: fix VAD and DTX for Whisper Mel offload - #11574

Open
singalsu wants to merge 1 commit into
thesofproject:intel/wov-d0i3-002from
singalsu:intel_wov-d0i3-002_fix_mfcc_whisper_offload
Open

singalsu wants to merge 1 commit into
thesofproject:intel/wov-d0i3-002from
singalsu:intel_wov-d0i3-002_fix_mfcc_whisper_offload

Conversation

@singalsu

@singalsu singalsu commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

The PCAN feature extraction add broke the VAD-controlled Whisper speech to text offload with the mel80 blobs. The VAD flag stayed at zero, and after enabling the VAD it was stuck at one after start.

Restore the DTX silence suppression in mfcc_output_compress(). It was removed to make the streaming wake-word detectors see every hop, but their blobs have enable_dtx = 0, so the suppression only applies to the ceps13_compress_dtx and mel80_compress_dtx blobs.

Add get_whisper_mel_config() to setup_mfcc.m for the mel80, mel80_compress and mel80_compress_dtx blobs. It restores the Whisper scaling with log10 Mel power, dynamic mmax and top_db = 8.0 clamp (80 dB), and enables the VAD with control updates. The shared get_mel_spectrogram_config() had been changed to natural log without an effective clamp and with VAD off. The other blobs are not changed.

Select the VAD noise floor rise and threshold by mode. The Mel log and cepstral modes return to the original rise 0.003 per hop and threshold 0.30, 12 dB above the floor with the Whisper scaling. With the slower rise 0.001 the floor, which follows the signal down instantly, drifted to the deepest per-bin noise dips, and noise-only frames reached 0.25 above it. PCAN and AGC8 keep the rise 0.001 and their thresholds 2.2 and 0.20. In sof-testbench4 with pink noise at -50 dBFS the VAD is now off in noise and follows the speech. The PCAN and AGC8 outputs are bit-exact with the previous version.

Update the README for the VAD thresholds and the mel80_compress_dtx blob.

The PCAN feature extraction add broke the VAD-controlled Whisper speech
to text offload with the mel80 blobs. The VAD flag stayed at zero, and
after enabling the VAD it was stuck at one after start.

Restore the DTX silence suppression in mfcc_output_compress(). It was
removed to make the streaming wake-word detectors see every hop, but
their blobs have enable_dtx = 0, so the suppression only applies to
the ceps13_compress_dtx and mel80_compress_dtx blobs.

Add get_whisper_mel_config() to setup_mfcc.m for the mel80, mel80_compress
and mel80_compress_dtx blobs. It restores the Whisper scaling with log10
Mel power, dynamic mmax and top_db = 8.0 clamp (80 dB), and enables the
VAD with control updates. The shared get_mel_spectrogram_config() had
been changed to natural log without an effective clamp and with VAD off.
The other blobs are not changed.

Select the VAD noise floor rise and threshold by mode. The Mel log and
cepstral modes return to the original rise 0.003 per hop and threshold
0.30, 12 dB above the floor with the Whisper scaling. With the slower
rise 0.001 the floor, which follows the signal down instantly, drifted
to the deepest per-bin noise dips, and noise-only frames reached 0.25
above it. PCAN and AGC8 keep the rise 0.001 and their thresholds 2.2
and 0.20. In sof-testbench4 with pink noise at -50 dBFS the VAD is now
off in noise and follows the speech. The PCAN and AGC8 outputs are
bit-exact with the previous version.

Update the README for the VAD thresholds and the mel80_compress_dtx blob.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu
singalsu marked this pull request as ready for review December 1, 2026 14:22
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