2025-10-08 12:36 PM
Hi all — I’ve successfully trained → quantized → deployed one of the audio models from the STM32 AI Model Zoo to an STM32N6570-DK (N6) and can see correct output over the serial port. Now I want to deploy my own model. The model was trained on custom features. I can export to ONNX with fixed input size and compatible ops and I know how to run the quantization + deployment flows from the Model Zoo service.
My questions:
Preprocessing location
The N6 audio example seems to compute only log-mel on-device. Can the Model Zoo service itself be configured to produce my custom features on the target, or is the intended approach to modify the STM32 application C code to implement my feature pipeline before inference?
Using ONNX with custom features
Anything specific I should set in the user config for ONNX quantization with a non-mel feature front-end (e.g., any flags to disable built-in mel generation assumptions)?
2025-10-09 2:30 AM - edited 2025-10-09 7:50 AM
Hello @Sahand,
1 - I don't know exactly what you mean by custom features, but there are several cases:
2 - ONNX quantization uses a calibration dataset, which is composed of log-melspectrograms in the model zoo, so if you want other features, you will have to perform the quantization himself and provide your custom features in the calibration dataset.
Have a good day,
Julian
2025-10-09 7:44 AM
2025-10-10 12:52 AM
HI @Sahand,
Unfortunately, none of the listed processing you listed is available on our C application, you will have to code them yourself.
Have a good day,
Julian
2025-10-10 7:23 AM
2025-10-13 12:48 AM - edited 2025-10-13 12:49 AM
Hello @Sahand,
I think you need to implement them in C because we don't have them.
My understanding is that the model zoo team coded the librosa (python) equivalent in C for the preprocessing they use.
So, when editing the user_config.yaml, it must copy it to the C application.
But they did not reproduce everything from librosa. So, if you use something we don't provide, you need to implement it yourself. (the python pipeline will not be able to generate automatically the corresponding C code).
Have a good day,
Julian