5

In using librosa.feature.rmse for sound feature extraction, I have the following:

import librosa
import numpy as np 

wav_file = "C://TEM//tem//CantinaBand3.wav"
y, sr = librosa.load(wav_file)

chroma_stft = librosa.feature.chroma_stft(y=y, sr=sr)

rmse=librosa.feature.rmse(y=y)[0]

print rmse

It gives me:

AttributeError: 'module' object has no attribute 'rmse'

What's the right way to get it?

Sample file: https://www2.cs.uic.edu/~i101/SoundFiles/CantinaBand3.wav

halfer
  • 19,824
  • 17
  • 99
  • 186
Mark K
  • 8,767
  • 14
  • 58
  • 118

1 Answers1

10

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:

rmse=librosa.feature.rms(y=y)[0]

and you should be fine.

Lukasz Tracewski
  • 10,794
  • 3
  • 34
  • 53