0

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.

Joshua Breeden
  • 1,844
  • 1
  • 16
  • 29
  • Your question is not clear - you don't seem familiar with the concepts of `audio`: (1) do you want to process the signal during recording callback or process already recorded audio file? (2) What is "base volume"? (3) how can you record from _speaker_? Speakers are not meant to capture sound, but to reproduce it. (4) What do you mean with tagging "objective-c" and "swift"? Neither is responsible for real-time audio processing. Please, try to learn few basic concepts of _digital audio_ and _computing_ before [asking a question](http://stackoverflow.com/help/asking). – user3078414 Jun 15 '16 at 20:11

1 Answers1

2

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.

Joshua Breeden
  • 1,844
  • 1
  • 16
  • 29