如何校准 dbfs 到 db spl?

How to calibrate dbfs to db spl?

我用网络音频播放声音 API 并使用 gainNode 来改变音量。当我更改 gainNode 的值时,分贝计显示的数字不是预期的。

context.createGain();
var source=context.createOscillator();
source.frequency.value=1000;
source.start();
source.connect(gainNode);
gainNode.connect(context.destination);

gainNode.gain.value=Math.pow(10, dbfs/20));

when dbfs=0,the Decibel meter showed 90 dbspl;
when dbfs=-10,the Decibel meter showed 84 dbspl;
when dbfs=-20,the Decibel meter showed 78 dbspl;
when dbfs=-30,the Decibel meter showed 72 dbspl;
when dbfs=-40,the Decibel meter showed 62 dbspl;
when dbfs=-50,the Decibel meter showed 52 dbspl;

实际音量没有像预期的那样变化,是不是gainNode的值生成有误?我想以 80 db spl 或其他特定数字播放声音,dbfs 的值是多少以及如何设置 gainNode 的值?

您的方法的一个缺陷是您使用的是正弦波音调。您需要使用粉红噪声,否则您房间中的反射可能会显着改变声波的最终能量。

理想情况下,您应该在消声室或自由场中进行测量,以避免反射干扰。

另一个问题可能是由于您的 SPL 表不准确或扬声器系统的非线性。例如,您的 SPL 表是否已校准?

我强烈建议阅读 this article 关于 SPL 测量的内容。

一般来说,数字和电气领域(即在您的计算机上以及 DAC 和放大器内部)的音频比声学领域(即您的房间、扬声器和麦克风),所以我会首先寻找它们的问题而不是软件。您可以尝试使用 REW 作为参考,也可以作为先测试您的声音/麦克风系统的工具。