Browse Source

Update spectrogram.py

Pete Shadbolt 4 years ago
parent
commit
6b4499cfaf
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      spectrogram.py

+ 1
- 1
spectrogram.py View File

@@ -16,7 +16,7 @@ def make_wav(image_filename):
16 16
     # Fourier transform, normalize, remove DC bias
17 17
     data = np.fft.irfft(image, h*2, axis=1).reshape((w*h*2))
18 18
     data -= np.average(data)
19
-    data *= (2**15.-1)/np.amax(data)
19
+    data *= (2**15-1.)/np.amax(data)
20 20
     data = array("h", np.int_(data)).tostring()
21 21
 
22 22
     # Write to disk