R
R
Ralfoz2021-11-11 20:02:23
Python
Ralfoz, 2021-11-11 20:02:23

Why are the MFCC coefficients different for the same window?

Please explain why the code produces the following results.
There is a wav file with a frequency of 48000 Hz, I extract Mel-frequency cepstral coefficients from it, a window and an offset of 240 samples (from the logic of 50ms * 48000).

def mel(wav_file):
    samples, sample_rate = librosa.load(wav_file, sr=None)
    mfccs = librosa.feature.mfcc(samples, sample_rate, hop_length=int(0.005 * sample_rate), n_fft=int(240))
    mfccs1 = librosa.feature.mfcc(samples[0:240], sample_rate, hop_length=int(0.005 * sample_rate), n_fft=int(240))
    print(mfccs[0][0], mfccs[1][0], mfccs[2][0], mfccs[3][0])
    print(mfccs1[0][0], mfccs1[1][0], mfccs1[2][0], mfccs1[3][0])


At the exit
-814.967 19.22025 13.9679365 8.873832
-984.62683 -13.866039 1.2349255 15.176905


Why are the coefficients different for the first window?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question