检测风噪声

发布于 2024-12-15 08:58:05 字数 1436 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

挽梦忆笙歌 2024-12-22 08:58:05

我刚刚看到这篇文章,我最近制作了一个可以检测录音中的风噪声的库。

我制作了风噪声模型并创建了示例数据库,然后训练机器学习算法以感知加权的方式检测和测量风级。

如果对任何人有用的话,C++/C 代码就在这里

I just came across this post I have recently made a library which can detect wind noise in recordings.

I made a model of wind noise and created a database of examples and then trained a Machine Learning algorithm to detect and meter the wind level in a perceptually weighted way.

The C++/C code is here if it is of use to anyone!

琉璃繁缕 2024-12-22 08:58:05

您的问题的科学称为“模式分类”,特别是“音频模式分类”的子领域。该任务被抽象为将录音分为两类(风和非风)。您似乎在信号处理方面还没有很强的背景,所以让我插入一个中心警告:
模式分类并不像乍看起来那么容易。人类擅长模式分类。计算机则不然。

第一个好的方法通常是计算信号和样本的傅立叶变换的相关性。然而,不知道这在多大程度上取决于风速。

您可能想看看 bag-of-frames 方法,它被成功地用于对环境噪声进行分类。

The science for your problem is called "pattern classification", especially the subfield of "audio pattern classification". The task is abstracted as classifying a sound recording into two classes (wind and not wind). You seem to have no strong background in signal processing yet, so let me insert one central warning:
Pattern classification is not as easy as it looks at first. Humans excel at pattern classification. Computers don't.

A good first approach is often to compute the correlation of the Fourier transform of your signal and a sample. Don't know how much that will depend on wind speed, however.

You might want to have a look at the bag-of-frames approach, it was used successfully to classify ambient noise.

紫罗兰の梦幻 2024-12-22 08:58:05

正如@thiton 提到的,这是音频模式分类的一个示例。

风的主要特征:它是一种整形(带/马力过滤)白噪声,在振幅和音调上具有小的半随机波动。至少大多数合成器都是这样再现它的,而且听起来很有说服力。

您必须检查波形文件中的频谱内容和变化,因此您需要 FFT。输入格式并不重要,但显然原始材料(wav)更好。

一旦你知道了,你应该检测到它接近某种有色噪声,然后也许提取一系列音调和幅度,并尝试对该数据集使用经典的模式分类算法。我认为监督学习可以在这里发挥作用。

As @thiton mentioned this is an example of audio pattern classification.

Main characteristics for wind: it's a shaped (band/hp filtered) white noise with small semi-random fluctuations in amplitude and pitch. At least that's how most synthesizers reproduce it and it sounds quite convincing.

You have to check the spectral content and change in the wavefile, so you'll need FFT. Input format doesn't really matter, but obviously raw material (wav) is better.

Once you got that you should detect that it's close to some kind of colored noise and then perhaps extract series of pitch and amplitude and try to use classic pattern classification algorithm for that data set. I think supervised learning could work here.

神仙妹妹 2024-12-22 08:58:05

这其实是一个很难解决的问题。

假设您只有一个麦克风数据。当您打开音频文件(时域信号)时获得的原始数据具有一些但不是很多用于此类处理的信息。您需要使用 FFT 进入频域并查看频率箱的统计数据,并使用它来使用 SVM 或随机森林构建分类器。

恕我直言,我也不会使用任何经过压缩的录音,例如 mp3。音频压缩算法总是会扭曲较高的频率,事实证明,这是现在检测风的一个重要特征。如果可能,从麦克风获取原始 PCM 数据。
您还需要确保您的录音采样频率至少为 24kHz,以便您获得高达 12kHz 的信号信息。

最后 - 频域中的风形不是简单的过滤白噪声。其特点是低频通常能量较高(隆隆声),高频则有尖锐、拍击声。 高频能量非常瞬态,因此如果您的 FFT 尺寸太大,您将错过这个重要的功能

如果您有 2 个麦克风数据,那么这会变得更容易一些。当有记录时,风是一种局部现象。当然,在录音中,您可以听到树叶的沙沙声或风引起的钟声。但这不是风噪声,不应该被过滤掉。

您在录音中听到的实际恼人的风噪声是空气撞击麦克风薄膜的声音。该效果是本地事件 - 如果您有 2 个麦克风,则可以利用该效果。它可以被利用,因为该事件是每个单独麦克风的本地事件,并且与其他麦克风不相关。当然,两个麦克风的放置位置也很重要。它们必须彼此相当接近(例如,在 8 英寸以内)。

然后可以使用时域相关性来确定风噪声的存在。 (所有其他录制的声音都相互相关,因为麦克风彼此相当接近,因此高相关性意味着没有风,低相关性意味着有风)。如果您采用这种方法,您的输入音频文件不需要解压缩。合理的压缩算法不会影响这一点。

我希望这个概述有所帮助。

This is actually a hard problem to solve.

Assuming you have only a single microphone data. The raw data you get when you open an audio file (time-domain signal) has some, but not a lot of information for this kind of processing. You need to go into the frequency domain using FFTs and look at the statistics of the the frequency bins and use that to build a classifier using SVM or Random Forests.

With all due respect to @Karoly-Horvath, I would also not use any recordings that has undergone compression, such as mp3. Audio compression algorithms always distorts the higher frequencies, which as it turns out, is an important feature in detecting wind now. If possible, get the raw PCM data from a mic.
You also need to make sure your recording is sampled at at least 24kHz so you have information of the signal up to 12kHz.

Finally - the wind shape in the frequency domain is not a simple filtered white noise. The characteristics is that it usually has high energy in the low frequencies (a rumbling type of sound) with sheering and flapping sounds in the high frequencies. The high frequency energy is quite transient, so if your FFT size is too big, you will miss this important feature.

If you have 2 microphone data, then this gets a little bit easier. Wind, when recorded, is a local phenomenon. Sure, in recordings, you can hear the rustling of leaves or the sound of chimes caused by the wind. But that is not wind-noise and should not be filtered out.

The actual annoying wind noise you hear in a recording is the air hitting the membrane of your microphone. That effect is a local event - and can be exploited if you have 2 microphones. It can be exploited because the event is local to each individual mic and is not correlated with the other mic. Of course, where the 2 mics are placed in relations to each other is also important. They have to be reasonably close to each other (say, within 8 inches).

A time-domain correlation can then be used to determine the presence of wind noise. (All the other recorded sound are correlated with each other because the mics are fairly close to each other, so a high correlation means no wind, low correlation means wind). If you are going with this approach, your input audio file need not be uncompressed. A reasonable compression algorithm won't affect this.

I hope this overview helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文