MFE feature gen. failure

When using MFE on a dataset, and trying to generate features i get following error, thats looks like an “off by one” indexing issue.
I cannot find the rerenced file “/home/…/third_party/speechpy/processing.py” to dive into implementation, have looked in the “processing-blocks” repos on github.

Any clues ?

Creating job… OK (ID: 538065)

Job started
Creating windows from 32 files...
[ 0/32] Creating windows from files...
[ 1/32] Creating windows from files...
[32/32] Creating windows from files...
Created 96 windows: inner: 45, outer: 51

Scheduling job in cluster...
Job started
Traceback (most recent call last):
  File "/home/create_features.py", line 71, in <module>
Creating features
    axes, freq, frame_length=0.02, frame_stride=0.01, num_filters=32, fft_length=256, low_frequency=300, high_frequency=None, win_size=101)
  File "/home/dsp.py", line 51, in generate_features
    low_frequency=low_frequency, high_frequency=high_frequency)
  File "/home/../third_party/speechpy/feature.py", line 196, in mfe
    zero_padding=False)
  File "/home/../third_party/speechpy/processing.py", line 141, in stack_frames
    frames = signal[indices]
IndexError: index 12500 is out of bounds for axis 0 with size 12500

Application exited with code 1 (Error)

Job failed (see above)

To quick, adjusting parameter rgd framelength etc seems to fix it

@opprud Thanks for the bug report! Here’s what was going on:

  1. Sampling frequency of 15625Hz.
  2. Frame length of 20ms, leading to a length per frame of (0.02 * 15625) = 312.5 values.
  3. 312.5 is rounded down to 312 and then used for the stack frame calculation (= 50.09 stack frames, rounded up to 51 frames, which is out of bounds).

Will release a fix on Monday.

Note: we have now updated the processing-blocks repo to include the third_party directory (always trailing a bit behind as we sync to the public repos weekly).

Cool, thanks for the explainer, i’ll take a peak at the 3’rd party repos :wink:

Np! Fix is being deployed tomorrow morning!