In using librosa.feature.rmse for sound feature extraction, I have the following:
JavaScript
x
12
12
1
import librosa
2
import numpy as np
3
4
wav_file = "C://TEM//tem//CantinaBand3.wav"
5
y, sr = librosa.load(wav_file)
6
7
chroma_stft = librosa.feature.chroma_stft(y=y, sr=sr)
8
9
rmse=librosa.feature.rmse(y=y)[0]
10
11
print rmse
12
It gives me:
JavaScript
1
2
1
AttributeError: 'module' object has no attribute 'rmse'
2
What’s the right way to get it?
Sample file: https://www2.cs.uic.edu/~i101/SoundFiles/CantinaBand3.wav
Advertisement
Answer
I am guessing you are running one of the latest librosa
. If you check the changelog for the 0.7
, you will notice that rmse
was dropped in favour of rms
. Simply run:
JavaScript
1
2
1
rmse=librosa.feature.rms(y=y)[0]
2
and you should be fine.