0

I am trying to put together a voice recording app, and I noticed a huge discrepancies in the audio samples levels returned by the AudioRecord when the same code is run on different devices (tried with LG G4, Samsung S4). Just FYI, I am targeting API Level 21.

Is there a way to make the returned values on different devices fall roughly within the same range?

Thanks

  • Compression might do the trick? But keep in mind input sensitivity might differ between devices – yun Feb 16 '16 at 16:02

1 Answers1

1

That is because microphones have different sensitivity and frequency response. You could:

  • Obtain/measure those characteristics across variety of devices and compensate for them.
  • Use some sort of calibration procedure. For example having a reference speaker, play the pink noise at given level, calculate the level and adjust the gain to the value that you want.
  • Use Automatic Gain Control.
jojeck
  • 935
  • 9
  • 29
  • Thank you for your reply, I think one of the suggested options will be the way to go. However before I accept a solution such as 1) or 2), I would like to fight a bit more for your suggested solution 3). Is it possible to point me to a good read about implementing AGC in real time, using code only? I know that AGC is usually implemented in hardware and not all Android devices manufacturers do. – Muhammad Arafat Feb 19 '16 at 17:11