Thank you very much! I tried your solution, it works perfectly! And I have another question: which could be faster for loading if  I save an .wav file as a numpy array or just load the wav file directly?