一、安装三方库
## pip install pydub
二、代码
from pydub import AudioSegment
import matplotlib.pyplot as plt
import matplotlib
matplotlib.use('Agg')
plt.figure(figsize=(20, 10), dpi=100)
sound1 = AudioSegment.from_file("1.wav", format="wav")
arr = sound1.get_array_of_samples()
plt.plot([i for i in range(0, len(sound1.get_array_of_samples().tolist()))], sound1.get_array_of_samples().tolist())
plt.show()
plt.savefig('12.jpg')