import sys, struct infp = open(sys.argv[1], "rb") hdr_riff = infp.read(4) if hdr_riff != "RIFF": raise Exception("not a RIFF WAVE file") infsize_total, = struct.unpack("