iOS: increase volume of recorded audio

扶醉桌前 提交于 2020-01-16 19:36:29

问题


Is it possible to process the audio and increase its base volume?

Please do not suggest to increase .volume property. I am looking for way to increase volume of already recorded audio programmatically and save that audio with big volume level.

I am recording from speaker.


回答1:


There are a couple ways of doing this. Normalization and Compression are the two that come to mind. See the links for better explanations.

  • Audio Normalization - calculate the current loudest sample in the file, and then apply equal gain to every sample such that the loudest sample is now at max volume.

  • Dynamic-range Compression - reduce the gain of a sample or group of samples when they exceed a threshold, and then apply gain to the whole file to compensate for this reduction.

iOS APIs may have a way of doing these already, though I'm not sure. Hopefully this gives you some rope to grab onto.



来源:https://stackoverflow.com/questions/37822286/ios-increase-volume-of-recorded-audio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!