audiobook-creation-exchange 0.1.0

ACX-compliant audio post-processing: normalisation, limiting, gating, LUFS measurement, and spectral analysis for AI-generated speech audio.
Documentation
use thiserror::Error;

/// Errors that can occur during ACX processing.
#[derive(Debug, Error)]
pub enum AcxError {
    #[error("PCM byte slice has odd length — not valid L16 mono")]
    OddByteLength,

    #[error("empty PCM input")]
    EmptyInput,

    #[error(
        "post-processing compliance failure: rms={rms_db:.1} dB (need {rms_min:.1}…{rms_max:.1}), \
         peak={peak_db:.1} dB (need ≤ {peak_ceiling:.1}), \
         noise_floor={noise_floor_db:.1} dB (need ≤ {noise_floor_max:.1})"
    )]
    StillNonCompliant {
        rms_db: f32,
        rms_min: f32,
        rms_max: f32,
        peak_db: f32,
        peak_ceiling: f32,
        noise_floor_db: f32,
        noise_floor_max: f32,
    },
}