简体   繁体   中英

How to add filters for the removal of noise from a recorded audio file in iOS

I am making an iPhone app to record and play the human voice back just like Talking Tom . Everything works fine, but I am not able to figure out how do I remove the background noise in recorded audio file?

I know the low pass filtering is an option to do so, but I dont know how to code this? Can anyone help me to implement a low pass filter or something else to remove the background noise from a recorded audio file in iOS.

I don't do ios, but there is an example of a low pass filter for accelerometer for the iphone at Accelerometer Low Pass Filtering which you may be able to adapt for your use.

Basically the filtered value at time x = unfiltered value at time x * alpha + filtered value at time x-1 * (1- alpha)

And for the filtered value at time 0 = unfiltered value at time 0 * alpha (assumes that the unfiltered value at time -1 is 0)

You will need to set the alpha using trial and error. Perhaps somewhere in the range 0.01 to 0.1 might be useful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM