Answer the question
In order to leave comments, you need to log in
How to remove loud sounds from the audio stream and amplify quiet ones in real time?
What algorithm can be used for such a problem?
The task is this - does the sound from the microphone (in digital form) go to the input of the module? there is somehow processed, and goes to the output.
Question: what algorithm to use? Can someone tell me the source code for the implementation of such an algorithm. Preferably in objective-c or C++.
Answer the question
In order to leave comments, you need to log in
Perhaps you will find something here
www.musicdsp.org/archive.php?classid=4#204
What you are looking for is called the AGC algorithm (automatic gain control)
In the simplest case, you can implement it like this:
1) calculate the moving average of the level - for example, in 1/10 of a second
2) if the calculated level is less than the minimum allowable, increase the module gain by a certain step, otherwise if the level is more than the maximum allowable, we reduce it by a certain step
3) go to 1)
there are a lot of links
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question