[英]How to plot a Spectrogram of an audio file using Third Octave (1/3) Band central frequency instead of default narrow band in python?
import matplotlib.pyplot as plot
from scipy.io import wavfile
samplingFrequency, signalData = wavfile.read('someaudiofile.wav')
plot.specgram(signalData,cmap=plot.cm.rainbow_r, Fs=samplingFrequency)
plot.xlabel('Time')
plot.ylabel('Frequency')
Here plot.specgram
is using narrow band to plot the Spectrogram, instead of that i want to use 1/3(third) octave band to plot spectrogram.这里
plot.specgram
使用窄带 plot 频谱图,而不是我想使用 1/3(第三)倍频程 plot 频谱图。 I am not aware which of the parameter of this plot.specgram
function I have to change.我不知道我必须更改此
plot.specgram
function 的哪个参数。
Is there any other python library or any other method through which I can plot Spectrogram using 1/3 octave band using two input ( signaldata/Sample and sampling frequency)?是否有任何其他 python 库或任何其他方法,通过它我可以使用两个输入(信号数据/样本和采样频率)使用 1/3 倍频程频段的 plot 频谱图?
The Python package python-acoustics has implementations of 1/3 octave bands according to IEC 61260-1. Python package python-acoustics根据 IEC 61260-1 实现了 1/3 倍频程频带。
For plotting you can use acoustics.Signal.plot_third_octaves .对于绘图,您可以使用acoustics.Signal.plot_third_octaves 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.