ritchieleeann / Hackbright-Project

Speaker Verification
22 stars 4 forks source link

/Users/lihong/src/Project-master/analysis_2.py:120: RuntimeWarning: divide by zero encountered in log log_spectrum = np.log(filtered_spectrum) nan #1

Open anthonyyuan opened 8 years ago

anthonyyuan commented 8 years ago

hi : when i test your app,but I find some problem . /Users/lihong/src/Project-master/analysis_2.py:120: RuntimeWarning: divide by zero encountered in log log_spectrum = np.log(filtered_spectrum) nan

dot product of power spectrum and mel filterbank

def MFCC(power_spectrum, filter_matrix): dct_spectrum = [] for power in power_spectrum: filtered_spectrum = np.dot(power, _filtermatrix)

# _ log_spectrum = np.log(filteredspectrum)

    dct_item= dct(log_spectrum, type=2)
    dct_spectrum.append(dct_item)
return dct_spectrum

take average MFCC for each bin

abeguerra commented 8 years ago

I think that's caused by wav file being too small. But take that with a grain of salt, I'm still education myself on this space.

anthonyyuan commented 8 years ago

Thank u