4.5 Auto gain
The purpose of automatic gain control is to achieve the target level of signals with uncertain levels while maintaining
the dynamic range of the volume.
Typical usage scenarios:
For example, when the user is speaking in front of the microphone, the distance between
the mouth and the microphone may be too far and near, which causes the output volume to fluctuate and even feel
intermittent in speech. Automatic gain is to set the threshold, output the input signal below the threshold in a ratio of
1:1, and directly increase the level above the threshold according to the ratio. After setting the target level, the sound
signal can be output stably.
Threshold:
When the signal level is lower than the threshold, the input/output ratio is 1:1. When the signal level is
higher than the threshold, input/output = ratio. Set this threshold level slightly higher than the noise ratio of your input
signal.
Target threshold: the required output signal level.
Automatic gain control
is to automatically control the amplitude of the gain by changing the input and output
compression ratio. When a weak signal is input, the signal is amplified to ensure the strength of the output sound
signal; when the input signal strength reaches a certain level, the signal is compressed to reduce the sound output
amplitude.