read and create .wav file for javascript