Inferencing SDK bug fix PR

Hi,

I’ve reported a bug and proposed fix to the SDK at the link below:

Fix continuous inferencing slicing with MFE and spectrogram features (for implementation version > 1) by tgarc · Pull Request #6 · edgeimpulse/inferencing-sdk-cpp (github.com)

Description copied here for convenience:

With the current SDK I noticed that using the MFE features (implementation version 2) would cause the SDK to request 1 extra frame/window than the total_signal_length given. I believe this is because a work-around from implementation version 1 is still being used when using MFE or spectrogram features regardless of the implementation_version; this commit fixed the issue for me.

This bug actually isn’t present with the MFCC features, so I just applied the same fix that was already in the MFCC per_slice_features implementation to the MFE and spectrogram features.

@Arjan can you review this?

Hi @tennies,

Thanks for finding this! I reviewed your code. It’s missing the signal->total_length reset to it’s original value, like we do in the MFCC -> https://github.com/edgeimpulse/inferencing-sdk-cpp/blob/36d06d5d55e57daefffa9263d6792e827aa9a055/classifier/ei_run_dsp.h#L505

I’ve created a fix in our master repo and will be merged in tomorrow or the day after.

Will keep you posted.

1 Like

Great. Thanks for looking at this @Arjan

1 Like

Hi @tennies,

Changes to MFE and spectrogram extract functions are live!

2 Likes