audioutils.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:gtzan.keras 作者: Hguimaraes 项目源码 文件源码
def splitsongs_melspect(self, X, y, cnn_type = '1D'):
    temp_X = []
    temp_y = []

    for i, song in enumerate(X):
      song_slipted = np.split(song, self.augment_factor)
      for s in song_slipted:
        temp_X.append(s)
        temp_y.append(y[i])

    temp_X = np.array(temp_X)
    temp_y = np.array(temp_y)

    if not cnn_type == '1D':
      temp_X = temp_X[:, np.newaxis]

    return temp_X, temp_y
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号