Python 中频谱图的 FFT [英] FFT for Spectrograms in Python

查看:42
本文介绍了Python 中频谱图的 FFT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将如何使用 Python 从 WAV PCM 文件中读取频率峰值,然后能够生成它的图像,用于频谱图分析?

我正在尝试制作一个程序,允许您读取任何音频文件,将其转换为 WAV PCM,然后找到峰值和频率截止.

解决方案

Python 的 wave 库 将让您导入音频.之后,您可以使用numpy进行FFT音频.

然后,matplotlib 制作了非常漂亮的图表 - 绝对可以与 MATLAB 相媲美.>

它像泥土一样古老,但是 这篇文章 可能会让您几乎完全了解您所描述的问题(当然是 Python 文章).

How would I go about using Python to read the frequency peaks from a WAV PCM file and then be able to generate an image of it, for spectogram analysis?

I'm trying to make a program that allows you to read any audio file, converting it to WAV PCM, and then finding the peaks and frequency cutoffs.

解决方案

Python's wave library will let you import the audio. After that, you can use numpy to take an FFT of the audio.

Then, matplotlib makes very nice charts and graphs - absolutely comparable to MATLAB.

It's old as dirt, but this article would probably get you started on almost exactly the problem you're describing (article in Python of course).

这篇关于Python 中频谱图的 FFT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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