在 Java 中使用傅立叶变换处理音频数据

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/962426/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 14:35:30  来源:igfitidea点击:

Processing Audio Data using Fourier Transforms in Java

javaaudiowavfft

提问by dedalo

I'm trying to process audio data. I'm working with Java. I've extracted the audio data to an array. Now I should pass N data samples to a function that calculates the Discrete Fourier Transform (or Fast Fourier Transform, which is more efficient). I've read documentation but I'm getting more and more confused. What I'm trying to calculate is the magnitude spectrum (|X(k)|). Can anyone help me? Thanks

我正在尝试处理音频数据。我正在使用 Java。我已经将音频数据提取到一个数组中。现在我应该将 N 个数据样本传递给一个计算离散傅立叶变换(或更有效的快速傅立叶变换)的函数。我已经阅读了文档,但我越来越困惑。我要计算的是幅度谱 (|X(k)|)。谁能帮我?谢谢

回答by Robert Harvey

Richard G. Baldwin has a number of very good articles on Fast Fourier Transform algorithms in Java on the Developer.com website. In particular, the following articles should prove to be useful:

Richard G. Baldwin 在 Developer.com 网站上有许多关于 Java 中的快速傅立叶变换算法的非常好的文章。特别是,以下文章应该被证明是有用的:

Fun with Java, Understanding the Fast Fourier Transform (FFT) Algorithmhttp://www.developer.com/java/other/article.php/3457251/Fun-with-Java-Understanding-the-Fast-Fourier-Transform-FFT-Algorithm.htm

Java 乐趣,理解快速傅立叶变换 (FFT) 算法http://www.developer.com/java/other/article.php/3457251/Fun-with-Java-Understanding-the-Fast-Fourier-Transform-FFT -算法.htm

Spectrum Analysis using Java, Sampling Frequency, Folding Frequency, and the FFT Algorithmhttp://www.developer.com/java/other/article.php/3380031/Spectrum-Analysis-using-Java-Sampling-Frequency-Folding-Frequency-and-the-FFT-Algorithm.htm

使用 Java、采样频率、折叠频率和 FFT 算法进行频谱分析http://www.developer.com/java/other/article.php/3380031/Spectrum-Analysis-using-Java-Sampling-Frequency-Folding-Frequency -and-the-FFT-Algorithm.htm

回答by Sher

If you only want Magnitude Spectrum of audio, go for jAudio API.

如果您只想要音频的 Magnitude Spectrum,请选择jAudio API

It provides class for calculating MS.

它提供了计算 MS 的类。

回答by c'quet

The link from @Sher is broken now. There is an API for the same purpose http://code.google.com/p/musicg/

来自@Sher 的链接现在已损坏。有一个用于相同目的的 API http://code.google.com/p/musicg/