Index: python/demos/demo_filterbank.py
===================================================================
--- python/demos/demo_filterbank.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_filterbank.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -2,5 +2,5 @@
 
 from aubio import filterbank, fvec
-from pylab import loglog, show, subplot, xlim, ylim, xlabel, ylabel, title
+from pylab import loglog, show, xlim, ylim, xlabel, ylabel, title
 from numpy import vstack, arange
 
Index: python/demos/demo_filterbank_slaney.py
===================================================================
--- python/demos/demo_filterbank_slaney.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_filterbank_slaney.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -2,5 +2,5 @@
 
 from aubio import filterbank
-from numpy import array, arange, vstack
+from numpy import arange, vstack
 
 win_s = 8192
Index: python/demos/demo_keyboard.py
===================================================================
--- python/demos/demo_keyboard.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_keyboard.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -26,5 +26,4 @@
 
 def create_keyboard_patches(firstnote, lastnote, ax = None):
-    import numpy as np
     import matplotlib.pyplot as plt
     from matplotlib.path import Path
Index: python/demos/demo_mel-energy.py
===================================================================
--- python/demos/demo_mel-energy.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_mel-energy.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -2,5 +2,5 @@
 
 import sys
-from aubio import fvec, source, pvoc, filterbank
+from aubio import source, pvoc, filterbank
 from numpy import vstack, zeros
 
Index: python/demos/demo_mfcc.py
===================================================================
--- python/demos/demo_mfcc.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_mfcc.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -3,5 +3,5 @@
 import sys
 from aubio import source, pvoc, mfcc
-from numpy import array, vstack, zeros
+from numpy import vstack, zeros
 
 win_s = 512                 # fft size
Index: python/demos/demo_onset_plot.py
===================================================================
--- python/demos/demo_onset_plot.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_onset_plot.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -3,5 +3,5 @@
 import sys
 from aubio import onset, source
-from numpy import array, hstack, zeros
+from numpy import hstack, zeros
 
 win_s = 512                 # fft size
Index: python/demos/demo_pitch.py
===================================================================
--- python/demos/demo_pitch.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_pitch.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -2,5 +2,5 @@
 
 import sys
-from aubio import source, pitch, freqtomidi
+from aubio import source, pitch
 
 if len(sys.argv) < 2:
Index: python/demos/demo_pitch_sinusoid.py
===================================================================
--- python/demos/demo_pitch_sinusoid.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_pitch_sinusoid.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -1,5 +1,5 @@
 #! /usr/bin/env python
 
-from numpy import random, sin, arange, ones, zeros
+from numpy import random, sin, arange, zeros
 from math import pi
 from aubio import fvec, pitch
@@ -11,5 +11,4 @@
   f = fvec (p.hop_size)
   cands = []
-  count = 0
   for vec_slice in input_vec.reshape((-1, p.hop_size)):
     f[:] = vec_slice
Index: python/demos/demo_pysoundcard_record.py
===================================================================
--- python/demos/demo_pysoundcard_record.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_pysoundcard_record.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -22,7 +22,6 @@
             g(mono_vec, hop_size)
             total_frames += hop_size
-    except KeyboardInterrupt, e:
+    except KeyboardInterrupt:
         print "stopped after", "%.2f seconds" % (total_frames / s.samplerate)
-        pass
     s.stop()
 
Index: python/demos/demo_reading_speed.py
===================================================================
--- python/demos/demo_reading_speed.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_reading_speed.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -6,7 +6,9 @@
 Compare the speed of several methods for reading and loading a sound file.
 
-This file depends on audioread and librosa:
-    https://github.com/beetbox/audioread
-    https://github.com/bmcfee/librosa
+This file depends on the following packages:
+
+    - audioread     https://github.com/beetbox/audioread
+    - librosa       https://github.com/bmcfee/librosa
+    - pydub         https://github.com/jiaaro/pydub
 
 """
@@ -14,6 +16,10 @@
 import numpy as np
 import aubio
+"""
 import audioread
 import librosa
+import scipy.io.wavfile
+from pydub import AudioSegment
+"""
 
 def read_file_audioread(filename):
@@ -26,5 +32,4 @@
         # Rescale and format the data buffer
         out = scale * np.frombuffer(buf, fmt).astype(dtype)
-        out = out.reshape(2, -1)
         return out
 
@@ -33,4 +38,5 @@
         for buf in f:
             samples = convert_buffer_to_float(buf)
+            samples = samples.reshape(f.channels, -1)
             total_frames += samples.shape[1]
         return total_frames, f.samplerate
@@ -38,5 +44,28 @@
 def load_file_librosa(filename):
     y, sr = librosa.load(filename, sr = None)
+    #print y.mean(), y.shape
     return len(y), sr
+
+def load_file_scipy(filename):
+    sr, y = scipy.io.wavfile.read(filename)
+    y = y.astype('float32') / 32767
+    #print y.mean(), y.shape
+    return len(y), sr
+
+def load_file_scipy_mmap(filename):
+    sr, y = scipy.io.wavfile.read(filename, mmap = True)
+    #print y.mean(), y.shape
+    return len(y), sr
+
+def read_file_pydub(filename):
+    song = AudioSegment.from_file(filename)
+    song.get_array_of_samples()
+    return song.frame_count(), song.frame_rate
+
+def load_file_pydub(filename):
+    song = AudioSegment.from_file(filename)
+    y = np.asarray(song.get_array_of_samples(), dtype = 'float32')
+    y = y.reshape(song.channels, -1) / 32767.
+    return song.frame_count(), song.frame_rate
 
 def read_file_aubio(filename):
@@ -59,4 +88,5 @@
         if read < f.hop_size: break
     assert len(y) == total_frames
+    #print y.mean(), y.shape
     return total_frames, f.samplerate
 
@@ -82,5 +112,15 @@
     filename = sys.argv[1]
 
-    functions = [read_file_aubio, load_file_aubio, read_file_audioread, load_file_librosa]
+    functions = [
+            read_file_aubio,
+            load_file_aubio,
+            #load_file_scipy,
+            #load_file_scipy_mmap,
+            #read_file_audioread,
+            #load_file_librosa,
+            #read_file_pydub,
+            #load_file_pydub,
+            ]
+
     for f in functions:
         test_speed(f, filename)
Index: python/demos/demo_sink_create_woodblock.py
===================================================================
--- python/demos/demo_sink_create_woodblock.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_sink_create_woodblock.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -4,5 +4,5 @@
 from math import pi, e
 from aubio import sink
-from numpy import arange, resize, sin, exp, zeros
+from numpy import arange, sin, exp, zeros
 
 if len(sys.argv) < 2:
Index: python/demos/demo_tempo_plot.py
===================================================================
--- python/demos/demo_tempo_plot.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_tempo_plot.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -40,5 +40,5 @@
 if len(beats) > 1:
     # do plotting
-    from numpy import array, arange, mean, median, diff
+    from numpy import mean, median, diff
     import matplotlib.pyplot as plt
     bpms = 60./ diff(beats)
Index: python/demos/demo_tss.py
===================================================================
--- python/demos/demo_tss.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_tss.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -45,2 +45,3 @@
     subplot(313)
     get_spectrogram(sys.argv[3])
+    show()
Index: python/demos/demo_waveform_plot.py
===================================================================
--- python/demos/demo_waveform_plot.py	(revision 143682ba94bf859c8bf730650e52af15addb7d00)
+++ python/demos/demo_waveform_plot.py	(revision 8fb567c216b107a503a12de4fa9bf3f30fa59a5f)
@@ -2,5 +2,5 @@
 
 import sys
-from aubio import pvoc, source
+from aubio import source
 from numpy import zeros, hstack
 
