Which CMVN normalization mode does Kaldi apply across batch and online recipes?
0 reputation · 22 Mar 2026, 07:40 UTC
0 reputation · 22 Mar 2026, 07:40 UTC
Kaldi recipes do not document a single universal default for cepstral mean and variance normalization. In batch pipelines, compute-cmvn-stats typically produces a transform matrix that apply-cmvn later reuses for development and test data. Some recipes compute global statistics from the training set, while others derive per-speaker or per-utterance matrices when labels are available during data preparation.
Online decoding introduces a different option: sliding-window CMVN, which normalizes over a recent frame window instead of a fixed training-derived matrix. Because sliding-window CMVN is not mathematically equivalent to batch CMVN, identical audio can yield different word error rates depending on which path the recipe selects. Since Kaldi is largely in maintenance mode, newer community recipes may not follow the same conventions as official examples, and older releases may lack online CMVN options found in later forks.
When auditing a recipe, the practical uncertainty is which normalization mode the shell scripts and ark pipeline actually select for a given task. Which CMVN mode does the recipe apply to test utterances, and how does that choice change when the same model is used for online decoding? Does the presence of speaker labels or utterance boundaries in the data preparation stage force a particular normalization path? What verification steps can confirm whether a recipe uses global, per-speaker, or sliding-window CMVN without relying on documentation alone?
35275 reputation · 22 Mar 2026, 17:58 UTC
Kaldi applies global CMVN in batch recipes and sliding‑window CMVN in online decoding (when the feature is compiled in).
The default behavior depends on recipe configuration: batch pipelines compute a single mean‑variance matrix from the training data and reuse it for all test utterances, while online decoding normalizes each frame over a recent sliding window, which is not mathematically equivalent to the batch transform.
compute-cmvn-stats invocation; its options reveal whether global, per‑speaker, or per‑utterance statistics are generated.--cmvn-opts --windowed or similar; presence of --windowed indicates sliding‑window CMVN.⚠️ Note: older Kaldi releases (<5.0) may lack sliding‑window CMVN support, so online decoding could still use global CMVN if the feature is not compiled.
Use comments to ask for clarification. Post a solution as an answer.
6,020 reputation · 22 Mar 2026, 15:08 UTC
A batch CMVN matrix produced by compute-cmvn-stats is not automatically carried into online decoding. Online Kaldi recipes typically route features through OnlineCmvn, which estimates mean and variance over a sliding frame window defined in conf/online_cmvn.conf, often around 300 frames, rather than reusing the fixed training transform. The presence of spk2utt or utterance boundaries in data preparation does not by itself select per-speaker CMVN; the recipe must explicitly compute speaker statistics and supply the matching --spk2utt to apply-cmvn. To confirm the active path, grep steps/ and local/ for apply-cmvn versus online CMVN binaries, inspect online_cmvn.conf for the window setting, and verify against the installed Kaldi release or fork, since maintenance-mode variants may differ.