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

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

问题描述

我怎么会去使用Python来读取从WAV PCM文件的频率峰值,然后才能产生它的一个形象,频谱图分析?

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?

我试图做一个程序,它可以读取任何音频文件,将其转换为WAV PCM,然后找到高峰和频率截止。

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的波库会让你进口音频。之后,你可以使用numpy的走音的FFT

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

然后, matplotlib 使得非常漂亮的图表和图形 - 绝对媲美MATLAB

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

这是旧如粪土,但这篇文章很可能让你开始几乎正是问题你所描述的(当然,在Python的文章)。

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).

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

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