I am curious to know if this problem is solved. The idea is quite simple. For a given audio (or video with audio) we limit the loudness to a specific value without using a cutoff or saturation. Let me explain e.g we have an audio where a person sometimes speaks in normal voice and sometimes shouts and somtimes mumbles in low voice. Now, we process the audio and "equalize" the loud shouting speech and low mumble speech so it sounds as loud as the normal speech without there being any obvious distortion in the sound that could occur if we applied a simple cut-off amplitude using saturation limit. Thus, it would appear that the person has been speaking at the same loudness the entire time.


2 Answers 2


Automatic Gain Control algorithms range from simple gain adjustments based on the input level and desired output level to more complicated algorithms that use loudness measurements and desired loudness levels (these days the ITU 1770 standard is mostly used).

There are also multi-band methods, where a wide-band AGC is followed by 4 or 5 compressor-limiters in appropriate frequency bands before being reconstructed.

AGC is mostly frame-based, usually needs some look-ahead and involves, on a high level:

  1. Input level or loudness measurement (can be smoothed using Exponential Moving Average filters)
  2. Gain signal computation based on the target (desired) level/loudness
  3. Gain signal interpolation
  4. Applying the gain signal to the input signal
  5. Limiter

Going further, some loudness control solutions also add a noise manager, so that noisy signals do not get "leveled" (imagine some low-level background noise being leveled up to a higher target level).

Finally, pumping/breathing artifacts happen at the low to high and high to low input level transitions, more so when the loudness leveling is set to be aggressive and care should be taken to find a good compromise between the aggressiveness of the solution and resulting artifacts.

  • $\begingroup$ Would a Wiener filter be suitable for removing the low-level background noise? $\endgroup$
    – user64710
    Commented Jun 29, 2023 at 11:37
  • $\begingroup$ @CaporalFourrier Wiener filters work well when the noise statistics are known. To use in real time, you'd need a good noise detection algorithm combined with statistical computations, and finally the filtering itself. Why not just use the noise detection and adapt the AGC time constants accordingly (noise detected -> no levelling) ? Furthermore, some background noise you wouldn't want to filter out (background ambience such as rain for example). You just don't want it to level up the way speech or music would. $\endgroup$
    – Jdip
    Commented Jun 29, 2023 at 11:55
  • $\begingroup$ "Automatic Gain Control" is a general purpose term like digital signal processing. Are you aware of some sort or product or design that does this, maybe somewhere on the internet? $\endgroup$
    – quantum231
    Commented Jun 29, 2023 at 18:46
  • 1
    $\begingroup$ @quantum231 AGC is indeed a general purpose term, hence why I specified "AGC algorithms". The one I described is pretty standard, but also rather basic. Most Television audio processing modules (either proprietary or third party solution) have a version of this running. For example going from a movie to a commercial, the difference in level can be drastic and a good loudness control solution is needed. It's also needed at the beginning of audio chains where modules down the chain rely on a consistent level (such as compressors). $\endgroup$
    – Jdip
    Commented Jun 29, 2023 at 19:31
  • 1
    $\begingroup$ Pretty sure every classical voice codec does some form of AGC as well to put the coefficients with which its represents speech into a useful range before quantizing them for compression purposes. Also pretty sure that car audio systems have an AGC to make whoever is calling you understandable but not painfully loud at whatever noise situation is currently in your car's cabin. $\endgroup$ Commented Jun 30, 2023 at 8:47

You are describing an AGC (automatic gain control) that is routinely used for even speech level. The term «dynamic compressor» is user somewhat overlapping.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.