性能代码中的峰值检测 [英] Peak detection in Performous code

查看:211
本文介绍了性能代码中的峰值检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找使用HPS方法在iphone中实现语音音高检测的方法.但是检测到的音调不是很准确. 性能可以很好地完成音高检测.

I was looking to implement voice pitch detection in iphone using HPS method. But the detected tones are not very accurate. Performous does a decent job of pitch detection.

我仔细阅读了代码,但没有完全理解计算背后的理论. 他们使用FFT并找到峰值.但是他们使用FFT输出相位的部分让我感到困惑.我认为他们对语音频率使用了一些启发式方法.

I looked through the code but i did not fully get the theory behind the calculations. They use FFT and find the peaks. But the part where they use the phase of FFT output, got me confused.I figure they use some heuristics for voice frequencies.

那么,任何人都可以解释"Performous"中用于检测音高的算法吗?

So,Could anyone please explain the algorithm used in Performous to detect pitch?

推荐答案

[Performous] [1]从麦克风中提取音高.该代码也是开源的.这是对该算法进行编码的人(irc.freenode.net#performous上的Tronic)的描述.

[Performous][1] extracts pitch from the microphone. Also the code is open source. Here is a description of what the algorithm does, from the guy that coded it (Tronic on irc.freenode.net#performous).

  • PCM输入(带缓冲)
  • FFT(一次1024个样本,然后从缓冲区的前面删除200个样本)
  • 重新分配方法(相对于之前的200个采样的FFT)
  • 过滤峰(可以做得更好,甚至可以省掉)
  • 将峰值组合成谐波组(我们称该组合为音调)
  • 对音调进行时间过滤(更新较早检测到的音调集,而不是简单地使用新检测到的音调)
  • 选择最佳人声(频率限制,加权,也可以使用谐波阵列,但我认为我们不这样做)

我仍然无法从这些信息中找出并实施它.如果有人管理此事,请在此处发布您的结果,并评论此回复,以便SO通知我.

I still wasn't able from this information to figure it out and implement it. If anyone manages this, please please post your results here, and comment this response so that SO notifies me.

任务是围绕此代码创建一个最小的C ++包装器.

The task would be to create a minimal C++ wrapper around this code.

这篇关于性能代码中的峰值检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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