Skip to main content

Module perceptual

Module perceptual 

Source
Expand description

Q06 Mode 0x0105: Perceptual auditory features (4 * feature_count B, Schema 203).

Enforces strict unit/scale separation (dB-SPL, sone, LUFS, mel, MFCC, ERB/Bark/Gammatone), explicit filterbank definitions (centers_hz, FIR coefficients, integration, reference_pressure_pa), ITU-R BS.1770-4/5 gating profiles separate from SPL, non-infinite silence handling, and raw source / legacy Q4AU v1/v2 feature preservation (Schema 209).

Structs§

PerceptualChunkView
Zero-heap borrowed view over verified 0x0105 perceptual feature vectors.
PerceptualDocumentView
PerceptualWriteSpec
Descriptor configuration for mode 0x0105 perceptual feature containers.

Enums§

PerceptualScale

Constants§

REFERENCE_PRESSURE_AIR_PA

Functions§

bs1770_integrated_lufs
ITU-R BS.1770-4/5 two-stage gated integrated loudness in LUFS (-70 LKFS absolute, -10 LU relative). block_mean_squares holds [channel] mean-square energies per 400 ms gating block.
dtft_magnitude
Evaluates DTFT magnitude |sum_n h[n] * exp(-i * 2*pi*nu*n)| at normalized freq nu = f/fs.
erb_bandwidth_hz
Glasberg & Moore (1990) ERB bandwidth in Hz at center frequency f_hz >= 0.
gammatone_fir_impulse
Synthesizes a unity-peak-gain 4th-order real Gammatone FIR filterbank impulse response (h[n]) at center_hz and sample_rate_hz.
hz_to_bark
Zwicker analytical Bark scale conversion.
hz_to_erb_number
Glasberg & Moore ERB-rate number scale (Cams).
hz_to_mel_htk
HTK Mel conversion (2595 * log10(1 + f / 700)).
mel_to_hz_htk
migrate_legacy_q4au_v2_features
Migrates a legacy Q4AU v2 container preserving exact original bytes (mode 0x0104), plane-0 spectra (mode 0x0101 under legacy-unknown), mel & MFCC planes (mode 0x0105), and Schema 209 LegacyRetention lineage without fabricating window/hop metadata.
read_perceptual_features_qac
rms_pa_to_db_spl
Exact dB-SPL from finite RMS acoustic pressure rms_pa >= 0 (p_ref > 0). Returns Err(SampleStatus::Silence) on exact zero RMS instead of -inf!
write_perceptual_features_qac
Writes canonical QAC v1 mode 0x0105 perceptual feature stream (Schema 203 + 205).