如何计算麦克风音频输入功率(以分贝为单位)
请帮我计算手机麦克风的分贝数。麦克风有一个 getMaxAmplitude()
函数。我如何使用它来计算分贝?我在一些论坛上看到分贝计算公式是power_db = 20 * log10(amplitude / reference_amplitude)
。但我不明白如何找到reference_amplitude
。
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
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在声音中,分贝值参考 20μPa(20 微帕)的声压级。
因此,在您的情况下,reference_amplitude 将是麦克风在声级为 20μPa 的声场中产生的振幅。
在实践中,为了找到这个电平,通常使用某个精确已知电平(通常在 94dB 左右)的信号来校准麦克风(使用麦克风校准器)。然后,可以使用该校准信号产生的幅度来计算参考信号的幅度(假设麦克风的响应是线性的)。
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).
分贝是一种广泛用于定义与其他事物相对的量的单位。分贝测量有多种不同类型,具体取决于您试图描述所接收信号的内容。
阅读此链接开始使用,它解释了您需要的一切比我更了解!
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!