1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import scipy import matplotlib.pyplot as plt import scipy.io.wavfile sample_rate, X = scipy.io.wavfile.read('audio.wav') print (sample_rate, X.shape ) plt.specgram(X, Fs=sample_rate, xextent=(0,30))Spectrogram in R is here.