且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

帮助快速傅立叶变换,显示两个音频.wav之间的差异

更新时间:2022-06-05 05:25:43

你的问题很模糊。



但似乎你必须:



对两个音频文件执行FFT

搜索网络应该为您提供各种编程语言的示例代码和库,以及如何将FFT应用于WAV文件。



缩放结果

因为你想要百分比,你必须将两个FFT都缩放到相同的水平。



计算每个频率的百分比

最简单的部分:

Your question is rather vague.

But it seems that you have to:

Perform FFT on both audio files
Searching the net should provide you with example code and libraries for various programming languages and how to apply FFTs to WAV files.

Scale the results
Because you want the percentage ratio you have to scale both FFTs to the same level.

Caluclate the percentage ratio for each frequency
The simplest part:
ratio[freq] = 100 * scaled_fft1[freq] / scaled_fft2[freq]



显示结果

一个简单的x-y图,其中x是频率,y是上面计算的比率。


Display the result
A simpley x-y diagram where x is the frequency and y is the above calculated ratio.