pyloudnorm is an active Python library (version 0.2.0) that provides an implementation of the ITU-R BS.1770-4 loudness algorithm. It enables flexible and programmatic control over loudness measurement parameters, including integrated loudness (LUFS) and Loudness Range (LRA). The library is primarily feature-driven, with recent major updates introducing new capabilities and refining Python compatibility.
pip install pyloudnormVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a `pyloudnorm.Meter` and measure the integrated loudness (LUFS) and Loudness Range (LRA) of a dummy audio signal. It highlights the primary API calls for basic loudness analysis.
Upgrade your Python environment to 3.9 or a newer compatible version.
Ensure the `sample_rate` argument passed to `pyln.Meter()` precisely matches the sample rate of your audio data.
Provide audio data of sufficient length for meaningful measurements. For integrated loudness, generally at least 400ms is required for the gating algorithm to operate correctly.
Process audio at standard or typical audio sample rates (e.g., 44.1 kHz, 48 kHz). If working with very low-frequency audio, consider resampling or understand that loudness measurements might not be perceptually valid.