标签:tle code simple rgb text save tps sam wav
音频判断:librosa和 matplotlib
Librosa是音频识别的包
matplotlib是音频转图片可视化的包
命令下载:
pip install librosa -i https://mirrors.ustc.edu.cn/pypi/web/simple
pip install matplotlib -i https://mirrors.ustc.edu.cn/pypi/web/simple
# 2.判断音频是否有声音 # Load the audio as a waveform `y` # Store the sampling rate as `sr` y, sr = librosa.load(file_name_dir, sr=None) plt.figure() librosa.display.waveplot(y, sr) plt.title(‘Beat wavform‘) plt.savefig(‘Picture/{0}.png‘.format(name)) print(type(y)) plt.close(‘all‘)
标签:tle code simple rgb text save tps sam wav
原文地址:https://www.cnblogs.com/blackpink/p/14386449.html