计算来自多个麦克风的声音输入的时间差 [英] Calculating time difference in sound input from multiple microphones

查看:138
本文介绍了计算来自多个麦克风的声音输入的时间差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C#项目,它将多个(目前为2个)麦克风作为音频设备,检测来自它们的声音,使用傅里叶变换处理它们的音频帧并显示它们。它还以三种颜色打印它们:红色用于具有较强输入的麦克风,绿色用于具有较弱输入的麦克风,灰色用于不足以引起任何兴趣的帧。



我的项目的下一步是计算到达每个麦克风的声音样本的时差。例如,如果我直接对着一个麦克风讲话而另一个距离是3英尺远,那么差异应该是大约3毫秒(假设声速为1英尺/毫秒)。这当然只是一个例子。



任何人都可以帮我这个吗?我已基于此制作了我的项目: C#中的声音可视化工具

I have a C# project that takes multiple (2 at the moment) microphones as an audio devices, detects sound from them, processes their audio frames with Fourier Transform and displays them. It also prints them in three colors: red is for microphone that has stronger input, green is for microphone that has weaker input and grey is for frames that arent strong enough to be of any interest.

Next step of my project is to calculate the time difference of sound samples that arrive at each microphone. For example if i speak directly to one microphone and the other is 3 feet away, the difference should be about 3 ms (assuming sound speed at 1feet/ms). This is of course just an example.

Can anyone help me with this? I''ve made my project based on this: Sound visualizer in C#

推荐答案

粗略地说,我首先将两个图的幅度标准化,然后对它们中的一个进行时间转换,直到达到最佳叠加。
Roughly speaking, I would first normalize the amplitude of the two graphs and then time-translate one of them until best superposition is reached.


这篇关于计算来自多个麦克风的声音输入的时间差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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