How to get maximum amplitude (decibel value) of an audio track/mic recording in Android?

StackOverflow https://stackoverflow.com/questions/14317111

  •  15-01-2022
  •  | 
  •  

Pregunta

I read plenty of threads even here on SO but still I do not know how to develop a sound level meter to get the sound level from the mic and display it as a decibel value.

I am using the code from the SoundMeter class like many suggested, but what this class does is representing the sound amplitude in a scale between 0 to 12, and it goes to 12(maximum value) very easily, just tapping my fingers on the device.

Any suggestion/tutorial will be very appreciated. I understand the calibration issue with mics and the various devices, I can calibrate the devices the app will be installed on against a proper sound meter tool as I am developing a company private app.

Cheers

¿Fue útil?

Solución

I found useful information and examples here:

Otros consejos

Tapping your finger on a mic is one of the loudest things you can do to a mic. (Like getting tapped right in your ear.) I would not be surprised if that causes a max decibel score. It will also cause clipping in the sound file.

Test with normal voice from a foot away from the mic. That should be midrange on the db level.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top