识别低频噪声中的短高频声音(objc/c)
我目前正在创建一个应用程序,它使用高频声音向其他设备发出就绪信号。
(发射器):设备会产生约 20khz 的短促声音。
(接收器): 另一台设备将在距发射器较近的距离(约 10m)处监听此频率的声音 该设备从麦克风接收音频数据
背景噪音将相当大,各不相同大约0 - 10khz(大约人类语音范围),并且将由一小群人产生。
我需要接收设备能够检测到 20khz 的声音,与噪音分离,
并知道接收到它的时间。
任何有关适当算法、库、甚至更好的 C 或
Objc 代码来检测这种高频声音的帮助将不胜感激。
I am currently creating an application which signals readiness to other devices using a high frequency sound.
(transmitter): A device will produce a short burst of sound of around 20khz.
(receiver): Another device will be listening for a sound at this frequency at a small distance from the transmitter(10m approx) The device recieves audio data from a microphone
The background noise will be fairly loud, varying from around 0 - 10khz(about human speech range), and would be produced by a small crowd of people.
I need the receiving device to be able to detect the 20khz sound, separated from the noise,
and know the time at which it was received.
Any help with an appropriate algorithm, a library, or even better, code in C or
Objc to detect this high frequency sound would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
20 kHz 可能会推动它,因为 (a) 大多数声卡在 18 - 20 kHz 具有低通(抗混叠)滤波器,并且 (b) 大多数扬声器和麦克风在 20 kHz 往往响应较差。您可能要考虑 15 kHz?
实际的检测部分应该很简单 - 只需在音调频率上实现窄带通滤波器,整流输出和低通滤波器(例如 10 Hz)。
20 kHz may be pushing it, as (a) most sound cards have low pass (anti aliassing) filters at 18 - 20 kHz and (b) most speakers and microphones tend to have a poor response at 20 kHz. You might want to consider say 15 kHz ?
The actual detection part should be easy - just implement a narrow band pass filter at the tone frequency, rectify the output and low pass filter (e.g. 10 Hz).
您可能想研究一下 FFT(快速傅里叶变换)。该算法将允许您分析波形并将其转换为频谱以供进一步分析。
You may want to look into FFT (Fast Fourier Transform). This algorithm will allow you to analyse a waveform and convert it to the frequency spectrum for further analysis.
这么高频率的声音根本不会通过 iPhone 扬声器传播。
A sound with that high frequency will not travel at all with the iphone speaker.