- This topic has 1 reply, 2 voices, and was last updated 1 year, 7 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › Fórum Classificação de Áudio com Python: O Guia Completo › AttributeError – ld.waveplot(y = mono_data, sr = sample_rate)
Boa noite!
Estou tendo problemas com:
————————————————————————–
AttributeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_10496\1004276437.py in <module>
—-> 1 ld.waveplot(y = mono_data, sr = sample_rate)
2 plt.xlabel(‘Tempo (segundos)’)
3 plt.ylabel(‘Amplitude’)
4 plt.show()
AttributeError: module ‘librosa.display’ has no attribute ‘waveplot
Teria alguma solução além de utilizar a versão anterior?
Obrigado
Olá David,
Se estiver utilizando a versão 0.10 da biblioteca librosa, é necessário ajustar o script. Aqui está um exemplo retirado da documentação para referência:
import matplotlib.pyplot as plt
y, sr = librosa.load(librosa.ex(‘choice’), duration=10)
fig, ax = plt.subplots(nrows=3, sharex=True)
librosa.display.waveshow(y, sr=sr, ax=ax[0])
ax[0].set(title=’Envelope view, mono’)
ax[0].label_outer()