summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-07-02 06:40:42 +0200
committerJules Laplace <julescarbon@gmail.com>2017-07-02 06:40:42 +0200
commitef0d6a05a1717b9cb9b52fca9285c9ba8c191b0c (patch)
tree94954b6f983d636ea9744ab600e42c07ce7af735 /python
parentbe26f182ccdff4f96c52d419deebee4aff055e18 (diff)
process aiff spectrum
Diffstat (limited to 'python')
-rw-r--r--python/spectrum.py4
1 files changed, 2 insertions, 2 deletions
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