import numpy
import scipy.io.wavfile
from scipy.fftpack import dct
sample_rate, signal = scipy.io.wavfile.read('OSR_us_000_0010_8k.wav') # File assumed to be in the same directory
signal = signal[0:int(3.5 * sample_rate)] #Keep the first 3.5 seconds
'''
显示这个图片
plt.figure(figsize=(20,5)) # 修改坐标显示
plt.xlabel("Time(s)")
plt.ylabel("Amplitude")
plt.plot(x , signal)
plt.show()
'''