normalize_audio: Normalize Audio Loudness

View source: R/audio.R

normalize_audioR Documentation

Normalize Audio Loudness

Description

A single loudnorm pass to an EBU R128 / ITU-R BS.1770 target – the light-touch cousin of broadcast_audio, which wraps loudnorm in a full mastering chain (high-pass, de-hum notches, compression, fades). Use this to level takes that are already clean, e.g. TTS output across a batch of tracks.

Usage

normalize_audio(input, output = input, integrated = -16, lra = 11, tp = -1.5,
                bitrate = "192k", overwrite = TRUE, dry_run = FALSE)

Arguments

input

Path to input audio (or A/V) file.

output

Path for output file (default: overwrite input in place).

integrated

Target integrated loudness in LUFS (default -16).

lra

Loudness range target in LU (default 11).

tp

True-peak ceiling in dBTP (default -1.5).

bitrate

Output audio bitrate for lossy formats (default "192k"), or NULL for the encoder default.

overwrite

If TRUE (default), overwrite the output file.

dry_run

If TRUE, return the FFmpeg command without executing.

Value

Invisibly returns the output path. If dry_run, returns the command string.

Examples

## Not run: 
normalize_audio("audio.mp3")
normalize_audio("take.wav", "leveled.wav", integrated = -14)

## End(Not run)


compost documentation built on Aug. 4, 2026, 5:11 p.m.