I need to create an audio loudness (decibel) detector. To clarify, I am not trying to find the volume at which the iPhone is playing, but instead the volume of its surrounding in decibels. How can I do this?
我需要创建一个音频响度(分贝)探测器。为了澄清,我不是要找到iPhone正在播放的音量,而是用分贝表示其周围的音量。我怎样才能做到这一点?
2 个解决方案
#1
2
Use one of the Audio Queue or Audio Unit APIs to record low latency audio, run the samples through a DSP filter to weight the spectrum for the particular type or color of loudness you want to measure, then calibrate the mic on all the particular models of iOS devices you want to run your detector on against calibrated sound sources, perhaps in an anechoic chamber.
使用其中一个音频队列或音频单元API来记录低延迟音频,通过DSP滤波器运行样本以对要测量的特定类型或响度颜色的频谱进行加权,然后在所有特定模型上校准麦克风。您想要在校准声源上运行探测器的iOS设备,可能在消声室中。
#2
3
It can be done using AVAudioRecorder: http://b2cloud.com.au/tutorial/obtaining-decibels-from-the-ios-microphone
它可以使用AVAudioRecorder完成:http://b2cloud.com.au/tutorial/obtaining-decibels-from-the-ios-microphone
#1
2
Use one of the Audio Queue or Audio Unit APIs to record low latency audio, run the samples through a DSP filter to weight the spectrum for the particular type or color of loudness you want to measure, then calibrate the mic on all the particular models of iOS devices you want to run your detector on against calibrated sound sources, perhaps in an anechoic chamber.
使用其中一个音频队列或音频单元API来记录低延迟音频,通过DSP滤波器运行样本以对要测量的特定类型或响度颜色的频谱进行加权,然后在所有特定模型上校准麦克风。您想要在校准声源上运行探测器的iOS设备,可能在消声室中。
#2
3
It can be done using AVAudioRecorder: http://b2cloud.com.au/tutorial/obtaining-decibels-from-the-ios-microphone
它可以使用AVAudioRecorder完成:http://b2cloud.com.au/tutorial/obtaining-decibels-from-the-ios-microphone