Question

I have recorded a sound using AVFoundation Framework. It plays well but it contains a lot of surrounding noise.

I need to remove this noise and also amplify the sound to increase the volume.

Can anybody please help with some sample code. Or please guide me how can I proceed further.

Was it helpful?

Solution

You may be able to convert to the frequency domain, process in the frequency domain to remove noise, and then convert back to the time domain.

To do this you could use overlapping frames. In fact you could lift the code straight out of here: http://www.dspdimension.com/admin/pitch-shifting-using-the-ft/ and then just replace the few lines where he is accomplishing pitch shifting with your own algorithm to reduce noise.

But as Paul R pointed out, you won't be able to design an algorithm that will handle all situations.

You should really look at the data in the frequency domain (there are plenty of spectralyzer apps available for the iPhone for example) and get some sort of idea of where the target signal is, and where the noise is, and whether you are likely to be able to separate them: if you can't do it easily by eye, you have practically no chance of getting an algorithm to do it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top