今天的内容有点不知道说啥=-=
赛题数据集
本次比赛的数据集来自Kaggle的“Eating Sound Collection”(可商用), 数据集中包含20种不同食物的咀嚼声音,赛题任务是给这些声音数据建模,准确分类。
数据探索
几方面收获:
波形幅度包络的查看:
plt.figure(figsize=(14, 5))
librosa.display.waveplot(data1,sr=sampling_rate1)
以及声谱图(声音或其他的频率随时间变化的表示)的查看:
plt.figure(figsize=(20, 10))
D = librosa.amplitude_to_db(np.abs(librosa.stft(data1)), ref=np.max)
plt.subplot(4, 2, 1)
librosa.display.specshow(D, y_axis='linear')
plt.colorbar(format='%+2.0f dB')
plt.title('Linear-frequency power spectrogram of aloe')
以及除了librosa之外,今天又认识了一个库哈哈哈哈,IPython.display.Audio: 该模块能使得音频直接在jupyter笔记本中播放。