cerlymarco / MEDIUM_NoteBook

Repository containing notebooks of my posts on Medium
MIT License
2.08k stars 975 forks source link

librosa #48

Closed TDL77 closed 1 year ago

TDL77 commented 1 year ago

in notebook : https://github.com/cerlymarco/MEDIUM_NoteBook/tree/master/Predictive_Maintenance_CRNN https://github.com/cerlymarco/MEDIUM_NoteBook/tree/master/Predictive_Maintenance_ResNet

in sample_mfcc = librosa.feature.mfcc(np.asfortranarray(sample),sr=40000) and sample_spectre = np.apply_along_axis(lambda x: librosa.feature.melspectrogram(x,sr=40_000) ,0, sample) ..... same errore TypeError: melspectrogram() takes 0 positional arguments but 1 positional argument (and 1 keyword-only argument) were given TypeError: mfcc() takes 0 positional arguments but 1 positional argument (and 1 keyword-only argument) were given

cerlymarco commented 1 year ago

Hi,

as stated by the error, you must specify all the arguments

example: np.apply_along_axis(lambda x: librosa.feature.melspectrogram(y=x,sr=40), 0, sample)

instead of: np.apply_along_axis(lambda x: librosa.feature.melspectrogram(x,sr=40), 0, sample)

if u support the project, don't forget to leave a star ;-)