Edge AI Add-on API 3.0.0
Loading...
Searching...
No Matches

◆ nrf_edgeai_obsv_metric_msd_create()

void nrf_edgeai_obsv_metric_msd_create ( nrf_edgeai_obsv_metric_t * metric,
void * buf,
uint16_t n_features )

#include <include/nrf_edgeai_obsv/nrf_edgeai_obsv_metrics.h>

Initialize a mel spectral descriptor metric using caller-provided storage.

Consumes the input-feature stream (NRF_EDGEAI_OBSV_SOURCE_FEATURES). For each feature vector it derives eight scale-invariant spectral-shape statistics — low/mid/high band energy ratios, spectral centroid, spread, entropy, flatness, and contrast — each normalized to [0, 1] and accumulated into its own histogram row. No amplitude calibration is required.

The caller allocates a buffer of at least NRF_EDGEAI_OBSV_MSD_STORAGE_BYTES bytes, passes it here, then registers the metric with nrf_edgeai_obsv_core_register().

Parameters
metricMetric descriptor to fill. Must not be NULL.
bufBuffer of at least NRF_EDGEAI_OBSV_MSD_STORAGE_BYTES(n_features) bytes, aligned to at least sizeof(uint32_t). Must not be NULL.
n_featuresMel feature vector length (> 0), used to validate updates.