简体   繁体   English

R 中的 function 从 a.wav 文件中提取 dB 值

[英]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.我有一些 .wav 格式的声音数据,我想从该文件中提取不同录音时间点的声压级数据(以 dB 为单位),这样我就知道录音在哪个时间点的音量有多大。 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.我已经下载了 r 包 bioacoustics、seewave 和 phonTools,但找不到 function 只给我 my.wav 文件的 dB 值。 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.您在提到的库中找不到 function 来提取分贝值的原因很简单:它不存在。 A microphone converts the pressure waves of sound into voltage changes and records them as stream of bytes.麦克风将声音的压力波转换为电压变化,记录为stream字节。 In digital audio, amplitude is measured in decibels below full scale (dBFS).在数字音频中,振幅以满刻度以下的分贝 (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.最大可能振幅为 0 dBFS,对应于用于存储数据的数据类型的最大绝对值。

dBFS is related to the acoustic decibels, but the correspondence is not direct. dBFS 与声学分贝有关,但对应关系并不直接。 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.一旦你有了这些,设计一个应用A 加权的滤波器,它将记录的 dBFS 转换为 dBSPL(A) - 声压级测量,相对于 20 μPa RMS 空气压力,A 加权。

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.在获得信号的 SPL 之前,您需要了解乐器的灵敏度、录音机的电压范围以及系统中的任何增益。 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.只有利用这些信息,您才能量化您在音频文件中观察到的不同声音的振幅。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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