Spectral audio features are compact scalar descriptors that summarize the shape of a magnitude spectrum — where its energy sits, how wide it is spread, how tonal or noise-like it is, and how quickly it changes over time. Instead of the full spectrum, each analysis window is reduced to a single number, producing one curve per feature. This makes spectral features ideal for sound characterization, building customer-specific metrics, and extracting inputs for AI/ML models.
Each feature is available in two forms: vs. Time (one value per overlapping FFT block along the time axis) and vs. RPM (one value per RPM step, sampled at the detected tacho / pulse-decoded speed crossing) — the latter is the tool of choice for run-up / coast-down characterization.
All features operate on the linear RMS magnitude spectrum (not dB, not power):
Let ak be the linear magnitude of bin k, fk
its frequency, and S = Σ ak the spectral sum.
Center of gravity of the spectrum — the primary correlate of perceived brightness.
Standard deviation of the spectrum about its centroid — how wide the energy is distributed (bandwidth).
Asymmetry of the spectral distribution around the centroid. Positive → energy leans toward lower frequencies with a high-frequency tail.
Peakedness / tailedness of the spectral distribution. High values indicate a sharp, concentrated spectrum.
Slope of a linear regression of magnitude against frequency — the overall spectral tilt. Negative for spectra that fall off with frequency.
Perceptually-motivated measure of how the amplitude decreases from the lowest bin upward; emphasizes the low-frequency slope.
Frequency below which a given fraction (default 95%) of the total spectral magnitude is contained. A robust indicator of spectral "skew" toward high frequencies.
Ratio of geometric to arithmetic mean of the magnitude spectrum (Wiener entropy). Near 1 → noise-like / flat; near 0 → tonal / peaky.
Peak-to-average ratio of the magnitude spectrum — large when a single tone dominates.
Shannon entropy (base 2) of the spectrum treated as a probability distribution pk = ak/S, scaled by log₂(N). High → disorder / noise; low → concentrated / tonal.
Amount of change between consecutive spectra — the L2 norm of the frame-to-frame magnitude difference. A high flux marks transients and onsets.
| Parameter | Default | Notes |
|---|---|---|
| Spectrum Size (FFT) | 4096 | Block length in samples |
| Window | Hanning | Applied before the FFT |
| Overlap | 50% | vs. Time only |
| RPM Step | 50 rpm | vs. RPM only |
| Rolloff Threshold | 0.95 | Spectral Rolloff only |
| Flux Norm | L2 | Spectral Flux only |
The vs. Time variant frames the signal into overlapping FFT blocks and reports one feature value per block. The vs. RPM variant instead places one FFT block at each RPM step crossing (using the pulse-decoded speed where available, otherwise a tacho channel), so features can be read directly against engine / motor speed during a run-up.