How to Use FFmpeg speechnormalizer for Clear Speech

This guide explains how to use the FFmpeg speechnormalizer filter to enhance speech clarity and reduce the impact of background noise in audio files. You will learn the core parameters of this filter, see practical command-line examples, and understand how to fine-tune the settings to achieve optimal voice intelligibility in challenging acoustic environments.

Understanding the speechnormalizer Filter

The speechnormalizer filter in FFmpeg is designed to improve speech intelligibility by dynamically adjusting the volume of an audio stream. Unlike standard volume normalizers that look at the peak volume of the entire file, the speech normalizer analyzes speech-specific characteristics. It boosts quiet speech, tames excessively loud passages, and avoids amplifying background noise during moments of silence.

Key Parameters for Controlling Noise and Clarity

To get the best results in a noisy environment, you must adjust the filter’s key parameters:

Practical Examples

1. Basic Speech Normalization

If your background noise is minimal and you simply want to make the dialogue more consistent and audible, use the default settings:

ffmpeg -i input.mp3 -af "speechnormalizer" output.mp3

2. Enhancing Speech in a Noisy Background

When dealing with significant background noise, you must increase the threshold so the noise is ignored, and slightly increase the compress factor to pull the voice out of the background.

ffmpeg -i input.wav -af "speechnormalizer=peak=0.9:rms=0.25:compress=1.5:threshold=0.15" output.wav

In this command: * peak=0.9 prevents clipping while keeping the signal strong. * rms=0.25 targets a slightly louder average speech volume. * compress=1.5 moderately squeezes the dynamic range to make quiet words easier to hear. * threshold=0.15 ensures that background noise up to 15% of the maximum volume is not amplified during pauses.

3. Extreme Dialogue Boost for Heavy Noise

For audio with very quiet speech buried under steady background hiss or hum, use a higher compression factor and a stricter threshold:

ffmpeg -i input.m4a -af "speechnormalizer=peak=0.95:rms=0.3:compress=2.0:threshold=0.25" output.m4a

Note: If the background noise is still too loud during speech itself, you can combine speechnormalizer with FFmpeg’s afftdn (FFT de-noise) filter for a cleaner result:

ffmpeg -i input.mp3 -af "afftdn,speechnormalizer=peak=0.9:rms=0.25:compress=1.5:threshold=0.15" output.mp3