From ef0d6a05a1717b9cb9b52fca9285c9ba8c191b0c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 2 Jul 2017 06:40:42 +0200 Subject: process aiff spectrum --- python/spectrum.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/spectrum.py b/python/spectrum.py index 514092b..267f368 100644 --- a/python/spectrum.py +++ b/python/spectrum.py @@ -13,8 +13,8 @@ FILENAME = sys.argv[1] N_FFT = 2048 def read_audio_spectum(filename): - fs, x = scipy.io.wavfile.read(filename) - S = librosa.stft(numpy.transpose(x)[0], N_FFT) + x, fs = librosa.load(filename, 44100) + S = librosa.stft(x, N_FFT) S = numpy.log1p(numpy.abs(S)) return S, fs -- cgit v1.2.3-70-g09d2