jameslyons / python_speech_features

This library provides common speech features for ASR including MFCCs and filterbank energies.
MIT License
2.37k stars 617 forks source link

Frame length is greater than FFT size #91

Open jiwidi opened 4 years ago

jiwidi commented 4 years ago

Hi!

So im getting this error when processing my files : WARNING:root:frame length (1200) is greater than FFT size (512), frame will be truncated. Increase NFFT to avoid.

My code looks like:

def wav2logfbank(f_path, win_size, n_filters):
    (rate, sig) = wav.read(f_path)
    fbank_feat = logfbank(sig, rate, winlen=win_size, nfilt=n_filters)
    os.remove(f_path)
    np.save(f_path[:-3] + "fb" + str(n_filters), fbank_feat)

Where I just pass the path to a .wav file.

Is it because my audio framerate? If so, how can i find the correct nfft size?

erikmav commented 4 years ago

See PRs #76, #77 (issue #74) and consider pulling them into your own fork to fix this.