0

Please help me calculate decibels from phone microphone. The microphone has a getMaxAmplitude() function. How I can I use it to calculate decibels? I read in some forums that the decibel calculation formula is power_db = 20 * log10(amplitude / reference_amplitude). But I don't understand how to find the reference_amplitude.

Nemesis
  • 3
  • 3
Andranik
  • 21
  • 1
  • 6

2 Answers2

1

Decibels are a unit widely used to define some quantity relative to something else. There are a number of different types of decibel measurements, depending on what you're trying to describe about the signal you're receiving.

Read this link to get you started, it explains everything you need to know much better than I can!

Speedy
  • 468
  • 2
  • 13
  • it did not help, i use android phone microphone – Andranik Aug 30 '11 at 13:51
  • The link was to help you learn about what decibel measurement actually means, as there are many different types. Without narrowing this down it's hard to help you implement it... – Speedy Aug 30 '11 at 14:39
1

In sound, decibel values are referenced to a sound pressure level of 20µPa (20 micro Pascal). So in your case the reference_amplitude would be the amplitude generated by your microphone in the presence of a sound field with a level of 20µPa.

In practice, to find this level, microphones are often calibrated (using a microphone calibrator) with a signal of some precisely known level (often around 94dB). The amplitude resulting from this calibration signal can then be used to calculate the amplitude for the reference signal (assuming the response of the microphone is linear).

Han
  • 1,927
  • 15
  • 23
  • but this no help , when I calculate decibels result are not correct – Andranik Sep 02 '11 at 12:19
  • Did you calibrate your microphone? – Han Sep 02 '11 at 20:38
  • I compared it with another program ! – Andranik Sep 06 '11 at 08:59
  • And how I can calibrate microphone of my mobile phone ? – Andranik Sep 06 '11 at 09:01
  • I don't think the microphones in mobile phones can be used for serious measurements. That being said, conventional microphone calibrators will not fit. You will have to compare the signal level of your phone's mic with the level of a known (calibrated) mic, or that of an SLM. – Han Sep 06 '11 at 12:51