C code example for inferencing model after importing silabs SLCC from edge impulse

Hello,

I have train an generated a voice recognition model, after trying the generated binary from the tool and through edge-impulse-cli, I have generated the library code as a Silabs Component (.slcc) and imported that compennt in one of my simplicity studio project. I fixed different build issue and now the code is compiling.

Question: What function / API should I call from my main task (FreeRTOS) to run the inference and detect the keyword triggered by the model ?

hardware: xg24-dev-kit
setup: mac


image

I have found this repo GitHub - edgeimpulse/example-standalone-inferencing-silabs.
Which I succeded to build and flash. Follwing that I noticed a comment in the main.cpp file, where I need to fill “fetures” from “Model Testing Page”. But I do not see any feature information to copy from this page: Can someone tell me what is referenced in this comment and what value should I put in this table ?

// Raw features copied from test sample
static const float features[] = {
    // Copy raw features here (e.g. from the 'Model testing' page)
};

Note it is also not clear to me how the input data from the microphone need to be passed to the model.

Hello @thleroy,

You can find it under the model testing page or live classification, see classify individual samples:

On the dark-blue card, you fill see the raw features, from there you can copy them.

Best,

Louis

Here I have an example on how to do with Arduino IDE but it’s the similar flow:

copy raw

Best,

Louis

Thank you. Next is to integrate all this at runtime on the embedded code on live data from the microphone embedded on silabs dev-kit. if you have usefull links for that I will be greaftull. Currently jumped on other tasks but as soon as I have some free times I will continue where I dropped.

1 Like