Expand description
ACX-compliant audio post-processing pipeline for speech audio.
Validates and repairs raw L16 mono PCM against the ACX audiobook specification (−23…−18 dBFS RMS, −3 dBFS true-peak, −60 dBFS noise floor) per https://www.acx.com/help/acx-producer-standards/201456300.
§Pipeline (applied in order by process)
- Click suppression — removes sub-10 ms transient spikes via cubic Hermite interpolation.
- DC offset removal — subtract the mean sample value.
- Noise reduction — Wiener spectral subtraction profiled from the leading silence
(disabled by default; requires a silent lead-in — see
AcxConfig::denoise_enabled). - EQ warmth — low-shelf (+2 dB @ 180 Hz) + high-shelf (+1.5 dB @ 5 kHz) biquad IIR.
- De-essing — OLA STFT; reduces 5–8 kHz sibilance band by up to −6 dB.
- Plosive suppression — OLA STFT; attenuates sub-150 Hz bins on plosive windows.
- Multiband compression — 3-band LR4 crossover compressor (250 Hz / 3 kHz crossovers); runs before normalisation so the level step sees the compressed spectrum.
- Normalise — linear gain to −20.5 dBFS, pre-compensated for bookend energy dilution.
- Limit — 5 ms lookahead brickwall limiter; no peak (including 4× interpolated) exceeds −3 dBFS.
- Breath removal — breath-band windows replaced with room tone (disabled by default).
- Pause normalisation — caps over-long inter-sentence pauses to natural targets (sentence 120 ms, paragraph 400 ms, scene break 700 ms); skips leading/trailing silence.
- Gate — sub-threshold 50 ms windows replaced with 1/f pink noise room tone.
- Bookend padding — first 1 s and last 3 s forced to room tone with 10 ms crossfades.
- Verify — second analysis pass; returns
Err(AcxError::StillNonCompliant)only when audio is irrecoverably broken.
§Standalone utilities
crossfade()— equal-power segment transitionconsistency_check— batch RMS variance check across multiple segmentsLoudnessPreset— pre-builtAcxConfigvariants for different delivery loudness levels
Re-exports§
pub use analyse::AcxReport;pub use analyse::analyse;pub use bitstream::CbrReport;pub use bitstream::Id3Report;pub use bitstream::check_cbr;pub use consistency::ConsistencyReport;pub use consistency::consistency_check;pub use crossfade::crossfade;pub use error::AcxError;pub use loudness_preset::LoudnessPreset;pub use lufs::LufsReport;pub use lufs::integrated_lufs;pub use lufs::loudness_range;pub use multiband::MultibandParams;pub use spectral::SpectralViolation;pub use spectral::SpectralViolationKind;pub use spectral::scan as spectral_scan;pub use temporal::DeadAirViolation;pub use temporal::check_bookends;pub use temporal::count_digital_zero_runs;pub use temporal::detect_dead_air;pub use temporal::max_dead_air;
Modules§
- analyse
- bitstream
- MP3 bitstream validation: CBR frame consistency and ID3v2 tag completeness.
- breath
- Breath removal: detect and suppress audible breath sounds in speech audio.
- click
- Click and impulse suppressor.
- consistency
- Inter-episode loudness consistency check.
- crossfade
- Chapter crossfade using equal-power (constant-power) fade curves.
- dc_
offset - DC offset detection and removal.
- deess
- Frequency-selective de-esser for TTS sibilance reduction.
- denoise
- Wiener spectral subtraction noise reducer.
- eq
- Warmth shelving equaliser — two biquad IIR filters applied in a single pass.
- error
- gate
- limiter
- loudness_
preset - Loudness preset factory — maps a delivery character to a tuned
AcxConfig. - lufs
- LUFS (Loudness Units relative to Full Scale) measurement per ITU-R BS.1770-4.
- multiband
- Three-band feed-forward RMS compressor.
- normalise
- pause_
norm - Inter-sentence pause normaliser.
- plosive
- Plosive suppression: gentle low-frequency shelving below 150 Hz.
- room_
tone - spectral
- FFT-based spectral analysis for sibilance and plosive detection.
- temporal
- Temporal silence validation: dead air, head/tail bookends, and digital zero detection.
Structs§
- AcxConfig
- Audio processing configuration.
- Diagnostic
Report - Full diagnostic report produced by
validate.
Functions§
- bytes_
to_ samples - Convert raw L16-LE bytes to i16 samples.
- process
- Run the full ACX post-processing pipeline on raw L16-LE PCM bytes.
- process_
with_ config - Like
processbut with a customAcxConfig. - samples_
to_ bytes - Convert i16 samples back to L16-LE bytes.
- validate
- Run a full diagnostic pass on raw L16-LE PCM bytes without modifying them.
- validate_
with_ config - Like
validatebut with a customAcxConfig.