Skip to main content

Crate audiobook_creation_exchange

Crate audiobook_creation_exchange 

Source
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)

  1. Click suppression — removes sub-10 ms transient spikes via cubic Hermite interpolation.
  2. DC offset removal — subtract the mean sample value.
  3. Noise reduction — Wiener spectral subtraction profiled from the leading silence (disabled by default; requires a silent lead-in — see AcxConfig::denoise_enabled).
  4. EQ warmth — low-shelf (+2 dB @ 180 Hz) + high-shelf (+1.5 dB @ 5 kHz) biquad IIR.
  5. De-essing — OLA STFT; reduces 5–8 kHz sibilance band by up to −6 dB.
  6. Plosive suppression — OLA STFT; attenuates sub-150 Hz bins on plosive windows.
  7. Multiband compression — 3-band LR4 crossover compressor (250 Hz / 3 kHz crossovers); runs before normalisation so the level step sees the compressed spectrum.
  8. Normalise — linear gain to −20.5 dBFS, pre-compensated for bookend energy dilution.
  9. Limit — 5 ms lookahead brickwall limiter; no peak (including 4× interpolated) exceeds −3 dBFS.
  10. Breath removal — breath-band windows replaced with room tone (disabled by default).
  11. 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.
  12. Gate — sub-threshold 50 ms windows replaced with 1/f pink noise room tone.
  13. Bookend padding — first 1 s and last 3 s forced to room tone with 10 ms crossfades.
  14. Verify — second analysis pass; returns Err(AcxError::StillNonCompliant) only when audio is irrecoverably broken.

§Standalone utilities

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 bitstream::check_id3_tags;
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.
DiagnosticReport
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 process but with a custom AcxConfig.
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 validate but with a custom AcxConfig.