使用.wav文件进行特征提取时运行此代码时出现错误

时间:2018-07-24 02:25:06

标签: python audio feature-extraction

我只是从这里使用此源代码
[链接] https://github.com/jaron/deep-listening/blob/master/3-us8k-cnn-extract-train.ipynb

它是有关特征提取的代码。我有pyhon 3.5,librosa(0.4.3),numpy(1.14.4)。我组合了librosa和numpy的多个版本,但是它总是会出现相同的错误

saving fold1
Traceback (most recent call last):
  File "C:/Users/puppy/Desktop/test/test.py", line 72, in <module>
    save_folds(save_dir)
  File "C:/Users/puppy/Desktop/test/test.py", line 50, in save_folds
    features, labels = extract_features(parent_dir, [fold_name])
  File "C:/Users/puppy/Desktop/test/test.py", line 23, in extract_features
    if (len(sound_clip[start:end]) == int(window_size)):
TypeError: slice indices must be integers or None or have an __index__ method
Process finished with exit code 1

0 个答案:

没有答案