pythonmfcc

Why I have several column with 13 features MFCC


I don't understand why when I compute my 13 MFCC features, I have an array of 13*76. I'm in python and I'm using librosa library.

for i in range(0,nbTrain):
    mfcc = librosa.feature.mfcc(y=Signal[i], sr= sr, n_mfcc=13)
    print(mfcc.shape)
    MFCC_coefficients.append(mfcc)

enter image description here

I obtain these dimension for each signal.

Usually should I obtain only array of 13*1 ?

Thank you for your answers.


Solution

  • Try this

     mfcc = np.floor(np.mean(librosa.feature.mfcc(y = signal, sr=fs, n_mfcc=13).T,axis=0))
     #np.floor is not necessary 
     #if you are not using .T the you shold add axis=1 instead of axis=0