#!/usr/bin/python

# converts wav file to mat
# ex: a0001.wav -> a0001.mat

import scipy.io.wavfile as wav
import scipy.io as sio
import sys

rate,data=wav.read(sys.argv[1])

print "rate: ",rate
print "numsamples: ",data.shape[0]

name=sys.argv[1].split('.')[0]
print "rec name: ", name
sio.savemat(name+'.mat',{'data':data})
