最快,最简单的算法比较两个声音的频率成分 [英] Quickest and easiest algorithm for comparing the frequency content of two sounds

查看:810
本文介绍了最快,最简单的算法比较两个声音的频率成分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要采取包含主频两个声音,说'这个人是比这更高。我可以做FFT,找到每个振幅最大的频率并进行比较。我想知道如果,因为我有一个特殊的任务,也有可能是一个更简单的算法。

I want to take two sounds that contain a dominant frequency and say 'this one is higher than this one'. I could do FFT, find the frequency with the greatest amplitude of each and compare them. I'm wondering if, as I have a specific task, there may be a simpler algorithm.

的声音与许多频率相当干净,但包含一个明确的主导间距。他们不完全产生正弦波。

The sounds are quite dirty with many frequencies, but contain a clear dominant pitch. They aren't perfectly produced sine waves.

推荐答案

由于声音相当脏,我建议在开始开发与FFT输出的算法,它会更简单的诊断问题。然后,当你很高兴,它的工作,你可以考虑一下优化/简化。

Given that the sounds are quite dirty, I would suggest starting to develop the algorithm with the output of an FFT as it'll be much simpler to diagnose any problems. Then when you're happy that it's working you can think about optimising/simplifying.

作为一个经验法则开发这种数字算法的时候,我总是试图在最相关的领域第一操作(在这种情况下你感兴趣的频率,所以在频率空间分析)在启动,一旦一切行为本身考虑的快捷方式/最佳化。这样,你可以测试对后者的解决方案的最佳表现前者。

As a rule of thumb when developing this kind of numeric algorithm, I always try to operate first in the most relevant domain (in this case you're interested in frequencies, so analyse in frequency space) at the start, and once everything is behaving itself consider shortcuts/optimisations. That way you can test the latter solution against the best-performing former.

这篇关于最快,最简单的算法比较两个声音的频率成分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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