fixed dtype problem with wav.write