MFCC Error: Number of samples, -6, must be non-negative

Inside the MFCC parameter configuration in Impulse Design, after I have imported my own data in the form of wav files, I get this error under the “DSP result”.

Using another preprocessing block, like spectral analysis, I don’t get any errors (which makes sense since this is a MFCC-specific error).

I received this error immediately while using the default values for MFCC. Changing some parameters at random seems to not change anything.
Anything else I need to tweak here? My data for sure contains a positive number of samples (since it is audio data I can listen to it), and I don’t understand why I am getting this message.

Another thing I noticed is that somehow my Raw Features box is empty, but when I add a Raw Data processing block the Raw Features will contain a number of samples. The Raw data graph shows a graph of my audio data in both cases.

Hi @bmulder, your audio data is at 250Hz (new data every 4ms.) - and the default frame stride and frame length are 2ms. These are lower than your frequency, and thus the MFCC code errors out. If you set both the stride and length to 0.04 this should work.

I’ll see if we can put a better error in place!

edit: I now see that the form might end up in an unusable state and the parameters don’t update. Let me see if there’s a quick workaround.

Strange, I tried changing this value to 1 and nothing happened before I typed this question.
Your reply makes perfect sense, but it seems I’ve got another problem: the “Save Parameters” button does not work for me. When I press it, nothing happens, and when I reload the page it reverts to the defaults.

Could be a browser issue, though

@bmulder Yeah the issue is that the once the DSP result fails on first request the form is in an invalid state. Will push a fix.

While I was trying some things out I actually realized that the lower frequency bound is an issue here too (300Hz minimum freq. is higher than 250!).

Try this:

  1. Set frame length to 0.04, set frame stride to 0.04
  2. Set low frequency to 1
  3. Switch to a different sample with the select box at the top
  4. Save button should work again.

Thanks, I managed to get it working this way

@bmulder, thanks for reporting back - fix will be in place permanently later this week!