读取 wav 文件并获得wav类型
def read_wav(inpath):
inwav = wave.open(inpath, "rb")
params = inwav.getparams()
nchannels, sampwidth, framerate, nframes, comptype, compname = params[:6]
print(" Number of channels:", str(nchannels))
print(" Byte width of each frame:", str(sampwidth))
print(" Frequency frame rate:", str(framerate))
print(" Number of audio frames:", str(nframes))
print(" Compression type:", str(comptype))
print("Description of compression type:", str(compname))
inwav.close()