简体   繁体   中英

What function in R extracts the dB values from a .wav file

I have some sound data in.wav format and I would like to extract Sound Pressure Level data from this file in dB for different timepoints of the recording so I know how loud the recording is at what timepoint. I have downloaded the r packages bioacoustics, seewave and phonTools but cannot find a function that just gives me the dB values of my.wav file. Any ideas?

Thank you!

The reason you can't find a function to extract decibel value in the libraries you have mentioned is simple: it cannot exist. A microphone converts the pressure waves of sound into voltage changes and records them as stream of bytes. In digital audio, amplitude is measured in decibels below full scale (dBFS). The maximum possible amplitude is 0 dBFS, which corresponds to the maximum absolute value of the data type that is used to store the data.

dBFS is related to the acoustic decibels, but the correspondence is not direct. You would need to know the characteristic of the microphone, eg frequency response, gain.

Once you have those, design a filter that applies A-weighting , which converts from the recorded dBFS to dBSPL(A) - sound pressure level measurement, relative to 20 μPa RMS air pressure, A-weighted.

Before you get the SPL of your signal, you need to know the sensitivity of your instrument, the voltage range of your recorder, and any gains in your system. It's only with this information that you will be able to quantify the amplitudes of different sounds you are observing in your audio files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM