从原始波形数据中检测特定频率/音调 [英] Detect a specific frequency/tone from raw wave-data

查看:27
本文介绍了从原始波形数据中检测特定频率/音调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在读取来自麦克风的原始波形流.
(这部分工作,因为我可以将它发送到扬声器并获得很好的回声.)

I am reading a raw wave stream coming from the microphone.
(This part works as I can send it to the speaker and get a nice echo.)

为了简单起见,假设我想检测波形数据中的 DTMF 音调.实际上,我想检测任何频率,而不仅仅是 DTMF 中的频率.但我总是知道我在寻找哪个频率.

For simplicity lets say I want to detect a DTMF-tone in the wave data. In reality I want to detect any frequency, not just those in DTMF. But I always know which frequency I am looking for.

我尝试通过 FFT 运行它,但如果我想要高精度的检测(假设它只存在 20 毫秒),它似乎效率不高.我可以检测到大约 200 毫秒的准确度.

I have tried running it through FFT, but it doesn't seem very efficient if I want high accuracy in the detection (say it is there for only 20 ms). I can detect it down to an accuracy of around 200 ms.

关于算法,我有哪些选择?是否有任何 .Net 库?

What are my options with regards to algorithms? Are there any .Net libs for it?

推荐答案

您可能想查看 Goertzel算法 如果您试图检测特定频率,例如 DTMF 输入.Sourceforge 上有一个基于该算法的 C# DTMF 生成器/检测器库.

You may want to look at the Goertzel algorithm if you're trying to detect specific frequencies such as DTMF input. There is a C# DTMF generator/detector library on Sourceforge based on this algorithm.

这篇关于从原始波形数据中检测特定频率/音调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆