A noisy voice recording is not one problem. Low-frequency handling noise, steady microphone hiss, fan noise, electrical hum, room reverberation, clipping, and codec artifacts have different causes, so a single aggressive denoiser rarely fixes all of them cleanly.
FFmpeg provides several useful building blocks for offline cleanup. A practical chain often starts by decoding the source, removing frequencies that clearly do not belong to the wanted signal, applying moderate broadband denoising, and writing the result to an uncompressed WAV file for further processing. The important part is restraint: noise reduction that is too strong can replace background noise with metallic, watery, or gated speech artifacts.
M4A and WAV describe different parts of the pipeline
An .m4a file is normally a container carrying compressed audio such as AAC or ALAC. WAV is a container commonly used for uncompressed PCM. Converting M4A to WAV does not remove noise by itself; it decodes the source into a representation that is convenient for editing and signal processing.
A direct conversion is:
ffmpeg -i input.m4a output.wavFor a speech-processing pipeline that explicitly needs mono, 16 kHz, 16-bit PCM:
ffmpeg -i input.m4a -ac 1 -ar 16000 -c:a pcm_s16le output.wavThose output parameters should match the next system’s requirements. Downmixing to mono and resampling to 16 kHz are not general-purpose quality improvements. They are appropriate when a speech recognizer, telephony pipeline, or another consumer expects that format.
Repeatedly encoding a lossy source is different. If an AAC recording is decoded, processed, and then encoded to AAC again, the second lossy encode can add more artifacts. Keeping an intermediate result as PCM WAV avoids another lossy generation while editing.
Remove irrelevant low frequencies before broadband denoising
Voice recordings often contain energy below the useful speech range from desk vibration, footsteps, wind, microphone handling, or air-conditioning systems. A high-pass filter attenuates frequencies below its cutoff instead of asking a broadband denoiser to solve everything.
For example:
ffmpeg -i input.wav -af "highpass=f=80" highpass.wavFFmpeg’s highpass filter is a high-pass biquad with a configurable cutoff. An 80 Hz cutoff is a reasonable starting point for many spoken recordings, not a universal value. A voice with useful low-frequency content, a recording of music, or material intended for acoustic analysis may require a lower cutoff or no high-pass filter at all.
The filter should therefore be chosen from the signal, not from a fixed recipe. Raising the cutoff until the recording sounds “clean” can also thin the voice because wanted low-frequency components are being removed.
Electrical hum needs different treatment. A 50 Hz or 60 Hz mains tone and its harmonics are narrow spectral components. A high-pass filter may reduce the fundamental when the cutoff is above it, but narrow notch filtering is more selective when preserving nearby low-frequency content matters.
afftdn targets noise in the frequency domain
FFmpeg’s afftdn filter denoises audio using FFT analysis. Its nr option controls noise reduction in decibels, while nf specifies a noise-floor estimate. The default noise reduction is 12 dB, which is already substantial enough that blindly increasing it is a poor tuning strategy.
A simple pass uses the filter defaults:
ffmpeg -i input.wav -af "afftdn" denoised.wavA more explicit starting point is:
ffmpeg -i input.wav -af "afftdn=nr=10:nf=-40" denoised.wavThe correct values depend on the recording. A quiet microphone hiss behind a close voice and a loud fan behind distant speech do not have the same noise floor or signal-to-noise ratio.
afftdn can also sample a noise profile. If the beginning of a recording contains 400 ms of representative background noise and no speech, FFmpeg can capture that section before applying the reduction:
ffmpeg -i input.wav -af "asendcmd=0.0 afftdn sn start,asendcmd=0.4 afftdn sn stop,afftdn=nr=10:nf=-40" profiled.wavA useful noise profile must actually represent the unwanted background. Sampling a section that contains speech teaches the filter a mixture of speech and noise, which can make wanted components more vulnerable to attenuation.
anlmdn uses a different denoising model
anlmdn reduces broadband noise with a Non-Local Means algorithm. Instead of using the same mechanism as afftdn, it compares local sample contexts and searches for similar patches around each sample.
A basic invocation is:
ffmpeg -i input.wav -af "anlmdn" denoised-nlm.wavIts s option controls denoising strength, while p and r control the patch and search radii. These parameters are not interchangeable with afftdn settings, so copying a numerical value from one filter to the other has no useful meaning.
The output mode is especially useful while tuning. anlmdn can emit the removed noise rather than the cleaned signal. Listening to that residual provides a practical diagnostic: if consonants, syllables, or obvious parts of the speaker appear strongly in the “noise” output, the filter is removing wanted information.
That principle applies beyond one algorithm. A denoiser should be judged not only by how quiet the pauses become, but also by what disappears from the voice.
Filter order changes what the denoiser receives
For a recording dominated by low-frequency rumble plus steady broadband hiss, this chain is a sensible starting point:
ffmpeg -i input.m4a \
-af "highpass=f=80,afftdn=nr=10" \
-c:a pcm_s16le clean.wavThe high-pass filter runs first. The denoiser therefore receives a signal in which some irrelevant low-frequency energy has already been attenuated.
That order is not an arbitrary cosmetic choice. Every filter changes the signal presented to the next filter. Compression before denoising, for example, can raise quiet background noise relative to the voice and make the denoiser’s job harder. Heavy normalization before cleanup can similarly make an otherwise modest noise floor more prominent.
For speech, a conservative sequence is often:
decode
↓
remove obvious rumble or narrow interference
↓
moderate broadband denoising
↓
optional EQ or dynamics processing
↓
final level control
↓
encode or write PCMThe exact chain should follow the defects present in the recording rather than accumulate filters merely because they are available.
Denoising cannot repair clipping
Noise reduction works on unwanted signal components that remain distinguishable enough from the wanted material. Clipping is different. When an input exceeds the available recording range, peaks are truncated and information about the original waveform is lost.
A denoiser cannot reconstruct that missing waveform from the clipped samples. Dedicated declipping algorithms can estimate plausible peak shapes in some recordings, but that is restoration by estimation, not recovery of the original samples.
The same limitation applies to severe codec artifacts and strong room reverberation. They may be reduced by specialized processing, but converting the file to WAV first does not reverse damage already present in the source.
This is why the cleanest workflow starts at capture: adequate microphone distance, sensible gain, less acoustic noise, and avoiding clipping usually produce a larger improvement than increasingly aggressive repair afterward.
Sample rate conversion belongs at a defined boundary
It is tempting to combine cleanup and format conversion into one command:
ffmpeg -i input.m4a \
-af "highpass=f=80,afftdn=nr=10" \
-ac 1 -ar 16000 -c:a pcm_s16le clean-16k.wavThat is valid when 16 kHz mono PCM is the required final interface. It is less appropriate when the cleaned file will be mastered, archived, or processed further at the source sample rate.
Resampling does not create missing detail, and reducing the sample rate intentionally narrows the representable frequency range. Likewise, changing a decoded AAC recording to 24-bit PCM does not restore precision discarded by the original lossy codec. Output format decisions should be driven by the next processing boundary.
For an archival intermediate, retaining the source channel layout and sample rate while writing PCM is often simpler:
ffmpeg -i input.m4a \
-af "highpass=f=80,afftdn=nr=10" \
-c:a pcm_s24le clean-master.wavA later export can then create the mono 16 kHz version required by speech software without forcing every intermediate step into that delivery format.
Compare the cleaned signal at matched loudness
A louder result is easy to mistake for a better result. Denoising, filtering, compression, and normalization can change perceived level, so comparisons are more useful when the original and processed versions are auditioned at similar loudness.
Listen specifically to consonants, breaths, word endings, and quiet transitions. Excessive denoising often becomes obvious there before it is obvious in sustained vowels. Also inspect pauses: a perfectly silent gap surrounded by speech with a synthetic texture may indicate that the processing is too aggressive.
The goal is not the lowest possible numerical noise floor. For spoken audio, the better result is usually the least processing that makes the unwanted noise unobtrusive while leaving speech stable and intelligible. FFmpeg makes that workflow reproducible because the filter chain and its parameters can be recorded exactly, compared, and adjusted instead of hidden behind a single “enhance” control.