home / skills / dkyazzentwatwa / chatgpt-skills / audio-normalizer

audio-normalizer skill

/audio-normalizer

This skill normalizes audio volume using peak or RMS methods and matches loudness for consistent playback.

npx playbooks add skill dkyazzentwatwa/chatgpt-skills --skill audio-normalizer

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
3.8 KB
---
name: audio-normalizer
description: Use when asked to normalize audio volume, match loudness, or apply peak/RMS normalization to audio files.
---

# Audio Normalizer

Normalize audio volume levels using peak or RMS normalization to ensure consistent loudness across files.

## Purpose

Volume normalization for:
- Podcast episode consistency
- Music playlist leveling
- Speech recording standardization
- Broadcast loudness compliance

## Features

- **Peak Normalization**: Normalize to maximum peak level (dBFS)
- **RMS Normalization**: Normalize to average loudness level
- **Loudness Matching**: Match LUFS target for broadcast compliance
- **Batch Processing**: Normalize multiple files to same level
- **Format Preservation**: Maintain original audio format
- **Headroom Control**: Prevent clipping with configurable headroom

## Quick Start

```python
from audio_normalizer import AudioNormalizer

# Peak normalization to -1 dBFS
normalizer = AudioNormalizer()
normalizer.load('input.mp3')
normalizer.normalize_peak(target_dbfs=-1.0)
normalizer.save('normalized.mp3')

# RMS normalization for consistent average loudness
normalizer.normalize_rms(target_dbfs=-20.0)
normalizer.save('normalized_rms.mp3')

# Batch normalize all files to same level
normalizer.batch_normalize(
    input_files=['audio1.mp3', 'audio2.mp3'],
    output_dir='normalized/',
    method='rms',
    target_dbfs=-20.0
)
```

## CLI Usage

```bash
# Peak normalization
python audio_normalizer.py input.mp3 --output normalized.mp3 --method peak --target -1.0

# RMS normalization
python audio_normalizer.py input.mp3 --output normalized.mp3 --method rms --target -20.0

# Batch normalize directory
python audio_normalizer.py *.mp3 --output-dir normalized/ --method rms --target -20.0

# Show current levels without normalizing
python audio_normalizer.py input.mp3 --analyze-only
```

## API Reference

### AudioNormalizer

```python
class AudioNormalizer:
    def load(self, filepath: str) -> 'AudioNormalizer'
    def normalize_peak(self, target_dbfs: float = -1.0, headroom: float = 0.1) -> 'AudioNormalizer'
    def normalize_rms(self, target_dbfs: float = -20.0) -> 'AudioNormalizer'
    def analyze_levels(self) -> Dict[str, float]
    def save(self, output: str, format: str = None, bitrate: str = '192k') -> str
    def batch_normalize(self, input_files: List[str], output_dir: str,
                       method: str = 'rms', target_dbfs: float = -20.0) -> List[str]
```

## Normalization Methods

### Peak Normalization
- Scales audio so highest peak reaches target level
- Preserves dynamic range
- Good for preventing clipping
- Target: typically -1.0 to -3.0 dBFS

### RMS Normalization
- Scales audio so average level reaches target
- Better for perceived loudness matching
- Good for podcasts and speech
- Target: typically -20.0 to -23.0 dBFS

### LUFS Matching
- Integrated Loudness Units relative to Full Scale
- Broadcast standard (EBU R128, ITU BS.1770)
- Target: -23 LUFS (broadcast), -16 LUFS (streaming)

## Best Practices

**For Podcasts:**
```python
normalizer.normalize_rms(target_dbfs=-19.0)  # Speech clarity
```

**For Music:**
```python
normalizer.normalize_peak(target_dbfs=-1.0)  # Preserve dynamics
```

**For Broadcast:**
```python
normalizer.normalize_rms(target_dbfs=-23.0)  # EBU R128 compliance
```

## Use Cases

- **Podcast Production**: Consistent volume across episodes
- **Music Playlists**: Even loudness for continuous playback
- **Audiobooks**: Standardized narration levels
- **Conference Recordings**: Normalize different speakers
- **Video Production**: Match audio levels before mixing

## Limitations

- Does not apply dynamic compression (use separate compressor)
- Does not remove DC offset (pre-processing recommended)
- Peak normalization won't match perceived loudness
- Doesn't fix clipped audio (distortion is permanent)

Overview

This skill normalizes audio volume using peak, RMS, or LUFS methods to ensure consistent loudness across files. It supports single-file and batch processing while preserving original formats and providing headroom control to avoid clipping. Use it to prepare podcasts, music, broadcasts, or any collection of recordings for consistent playback.

How this skill works

Load an audio file, analyze its peak, RMS, or LUFS levels, then apply a gain adjustment to reach the chosen target level. Peak normalization scales the highest sample to a target dBFS; RMS normalization adjusts average loudness for perceived level matching; LUFS matching targets integrated loudness for broadcast compliance. Batch mode applies the same target to multiple files and saves outputs in the original format with optional bitrate control.

When to use it

  • Preparing podcast episodes for consistent perceived loudness
  • Leveling a music playlist so tracks play at similar loudness
  • Matching dialog levels across video clips before mixing
  • Normalizing conference or interview recordings with multiple speakers
  • Ensuring files meet broadcast or streaming loudness targets (LUFS)

Best practices

  • Use RMS normalization (e.g. -19 to -23 dBFS) for spoken-word content to preserve clarity
  • Use peak normalization (e.g. -1 to -3 dBFS) for music to maintain dynamic range and avoid clipping
  • For broadcast compliance, target LUFS per standard (EBU R128: -23 LUFS; streaming often ~-14 to -16 LUFS)
  • Analyze levels first (analyze-only mode) to confirm existing peaks or clipping before applying changes
  • Do preprocessing like DC offset removal and repair clipped audio before normalization; normalization cannot fix distortion

Example use cases

  • Batch-normalize a season of podcast episodes to -19 dBFS RMS for consistent listener experience
  • Peak-normalize mastered music tracks to -1.0 dBFS to preserve dynamics while preventing inter-sample clipping
  • Match LUFS across video deliverables to meet broadcaster requirements (EBU R128)
  • Normalize multiple conference recordings so all speakers play at similar average levels
  • Analyze an audio folder to report peak/RMS/LUFS values without altering files

FAQ

Will normalization remove clipping or distortion?

No. Normalization adjusts gain but cannot repair clipped or distorted audio. Fix clipping with restoration tools before normalizing.

Which method should I choose for podcasts?

Use RMS normalization (target around -19 to -23 dBFS) for consistent perceived loudness and speech clarity.