MATLAB Answers


How to fix invalid window length in MFCC function of matlab R2018a ?

Asked by inggi ramadhani on 9 Dec 2018
Latest activity Commented on by inggi ramadhani on 6 Jan 2019
I use frequency sampling of 250 Hz. I've set the window length to 25 ms and overlap 15 ms. But it shows :
Invalid window length. WINDOWLENGTH must be in the range [2,size(x,1)], where x is the audio input.
The default window length depends on the specified sample rate: round(fs*0.03).
What should I do?


Show 1 older comment
% coeffs = MFCC(...,'OverlapLength',OVERLAPLENGTH) specifies the number
% of samples overlap between adjacent windows. Specify the overlap length
% as a positive scalar smaller than the window length. If unspecified,
% OVERLAPLENGTH defaults to round(fs*0.02).
I've set the overlap to 12. But it shows another error
Error using coder.internal.assert (line 33)
Mismatch between NumCoeffs and number of valid bandpass filters.
Specify NumCoeffs as less than or equal to the number of valid bandpass filters.
Error in coder.internal.errorIf (line 7)
coder.internal.assert(~cond, msgID, varargin{:});
Error in audio.internal.AuditoryCepstralCoefficients/verifyNumCoeffs (line 369)
coder.internal.errorIf(obj.NumCoeffs > obj.poNumValidBands, ...
Error in audio.internal.AuditoryCepstralCoefficients/setupImpl (line 193)
Error in mfcc (line 93)
coeffs(:,:,chan) = (mfccObject(y))';
Error in roadto250 (line 8)
coeff = mfcc(norm,250,'WindowLength',25,'OverlapLength',12)
What should I do?

Sign in to comment.


0 Answers