librosa.display.waveplot(np.array(f),sr=22050)-----AttributeError: 'module' object has no attribute 'display'

Yiin picture Yiin · Apr 21, 2017 · Viewed 10.9k times · Source

Referring to this link: https://aqibsaeed.github.io/2016-09-03-urban-sound-classification-part-1/, I am trying to make the same waveplot figure, however,i run the code through .py, there is the error:

(tensorflow) yyydeMacBook-Pro:~ yyy$ python /Users/yyy/Desktop/1.py 
Traceback (most recent call last):
  File "/Users/yyy/Desktop/1.py", line 82, in <module>
    plot_waves(sound_names,raw_sounds)
  File "/Users/yyy/Desktop/1.py", line 42, in plot_waves
    librosa.display.waveplot(np.array(f),sr=22050)
AttributeError: 'module' object has no attribute 'display'

Answer

Herman picture Herman · May 20, 2017

From this github issue I read that it is now necessary to import librosa.display.