from scipy.io.wavfile import read
filepath = glob.glob('*.wav') #list
rate,data = [read(fp) for fp in filepath]
and I get :
ValueError: too many values to unpack
but i can load only once a time.
like this:
rate,data = read('001.wav')
print rate
print data
and I get:
44100
[0 0 0 ..., 0 0 0]
How could I load the rate and data to two arrays, and if I do :
datas = [read(fp) for fp in filepath]
I will get :
[(44100, array([0, 0, 0, ..., 0, 0, 0], dtype=int16)), (44100, array([0, 0, 0, ..., 0, 0, 1], dtype=int16)), ..., (44100, array([0, 0, 0, ..., 0, 0, 0], dtype=int16))]
or there is any way I can split the datas to rate and data after loading.
Thanks.