I think you need to clarify what you mean by "deciBel". There are several different types of dB that mean completely different things. An example of the fact that Soham gives you the calculation of the dB peak relative to the reference amplitude, the proposed article proposes to use a maximum digital value of 1.0. This means that the value you select will be in the range of -96 dB to 0 dB for 16-bit audio capture.
I suspect that what you want to do is measure the sound pressure level (range where speech is about 50 dB, inkjet load 120 dB). This is called 'db (SPL)' . You cannot do this on your device if you do not have the means to calibrate the device against certain power levels.
There are additional considerations you need to make. One is that you need peak or RMS power levels (peak for instant events, RMS for continuous sound such as music). You also need to know how to turn off automatic gain control on the device, as this will make any measurements pointless.
source share