/* * Copyright (c) 2026 EdgeImpulse Inc. * * Generated by Edge Impulse and licensed under the applicable Edge Impulse * Terms of Service. Community and Professional Terms of Service * (https://edgeimpulse.com/legal/terms-of-service) or Enterprise Terms of * Service (https://edgeimpulse.com/legal/enterprise-terms-of-service), * according to your product plan subscription (the “License”). * * This software, documentation and other associated files (collectively referred * to as the “Software”) is a single SDK variation generated by the Edge Impulse * platform and requires an active paid Edge Impulse subscription to use this * Software for any purpose. * * You may NOT use this Software unless you have an active Edge Impulse subscription * that meets the eligibility requirements for the applicable License, subject to * your full and continued compliance with the terms and conditions of the License, * including without limitation any usage restrictions under the applicable License. * * If you do not have an active Edge Impulse product plan subscription, or if use * of this Software exceeds the usage limitations of your Edge Impulse product plan * subscription, you are not permitted to use this Software and must immediately * delete and erase all copies of this Software within your control or possession. * Edge Impulse reserves all rights and remedies available to enforce its rights. * * Unless required by applicable law or agreed to in writing, the Software is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing * permissions, disclaimers and limitations under the License. */ #ifndef _EI_CLASSIFIER_MODEL_VARIABLES_H_ #define _EI_CLASSIFIER_MODEL_VARIABLES_H_ /** * @file * Auto-generated complete impulse definitions. The ei_impulse_handle_t should * be passed to ei_run_classifier() function to use this specific impulse. * This file should only be included in ei_run_classifier.h file. */ #include #include "model_metadata.h" #include "tflite-model/tflite_learn_1052106_5_compiled.h" #include "edge-impulse-sdk/classifier/ei_model_types.h" #include "edge-impulse-sdk/classifier/inferencing_engines/engines.h" #include "edge-impulse-sdk/classifier/postprocessing/ei_postprocessing_common.h" const char* ei_classifier_inferencing_categories_1052106_1[] = { "background_noise", "hey_edge", "unknown" }; ei_dsp_named_axis_t ei_dsp_config_1052106_6_named_axes[] = { { .name = "Signal", .axis = 0 } }; size_t ei_dsp_config_1052106_6_named_axes_size = 1; EI_CLASSIFIER_DSP_AXES_INDEX_TYPE ei_dsp_config_1052106_6_axes[] = { 0 }; const uint32_t ei_dsp_config_1052106_6_axes_size = 1; ei_dsp_config_mfe_t ei_dsp_config_1052106_6 = { 6, // uint32_t blockId 4, // int implementationVersion 1, // int length of axes ei_dsp_config_1052106_6_named_axes, // named axes ei_dsp_config_1052106_6_named_axes_size, // size of the named axes array 0.02f, // float frame_length 0.01f, // float frame_stride 40, // int num_filters 256, // int fft_length 0, // int low_frequency 0, // int high_frequency 101, // int win_size -52 // int noise_floor_db }; const uint8_t ei_dsp_blocks_1052106_1_size = 1; ei_model_dsp_t ei_dsp_blocks_1052106_1[ei_dsp_blocks_1052106_1_size] = { { // DSP block 6 6, 3960, // output size &extract_mfe_features, // DSP function pointer (void*)&ei_dsp_config_1052106_6, // pointer to config struct ei_dsp_config_1052106_6_axes, // array of offsets into the input stream, one for each axis ei_dsp_config_1052106_6_axes_size, // number of axes 1, // version nullptr, // factory function nullptr, // data normalization config } }; const ei_config_tflite_eon_graph_t ei_config_graph_1052106_5 = { .implementation_version = 1, .model_init = &tflite_learn_1052106_5_init, .model_invoke = &tflite_learn_1052106_5_invoke, .model_reset = &tflite_learn_1052106_5_reset, .model_input = &tflite_learn_1052106_5_input, .model_output = &tflite_learn_1052106_5_output, }; const uint8_t ei_output_tensors_indices_1052106_5[1] = { 0 }; const uint8_t ei_output_tensors_size_1052106_5 = 1; ei_learning_block_config_tflite_graph_t ei_learning_block_config_1052106_5 = { .implementation_version = 1, .block_id = 5, .output_tensors_indices = ei_output_tensors_indices_1052106_5, .output_tensors_size = ei_output_tensors_size_1052106_5, .quantized = 1, .compiled = 1, .graph_config = (void*)&ei_config_graph_1052106_5, .dequantize_output = 0, }; const uint8_t ei_learning_blocks_1052106_1_size = 1; const uint32_t ei_learning_block_1052106_5_inputs[1] = { 6 }; const uint8_t ei_learning_block_1052106_5_inputs_size = 1; const ei_learning_block_t ei_learning_blocks_1052106_1[ei_learning_blocks_1052106_1_size] = { { 5, &run_nn_inference, (void*)&ei_learning_block_config_1052106_5, EI_CLASSIFIER_IMAGE_SCALING_NONE, ei_learning_block_1052106_5_inputs, ei_learning_block_1052106_5_inputs_size, }, }; ei_fill_result_classification_i8_config_t ei_fill_result_classification_i8_config_1052106_5 = { .zero_point = -128, .scale = 0.00390625 }; const size_t ei_postprocessing_blocks_1052106_1_size = 1; const ei_postprocessing_block_t ei_postprocessing_blocks_1052106_1[ei_postprocessing_blocks_1052106_1_size] = { { .block_id = 5, .type = EI_CLASSIFIER_MODE_CLASSIFICATION, .init_fn = NULL, .deinit_fn = NULL, .postprocess_fn = &process_classification_i8, .display_fn = NULL, .config = (void*)&ei_fill_result_classification_i8_config_1052106_5, .input_block_id = 5 }, }; const uint8_t freeform_outputs_1052106_1_size = 0; uint32_t *freeform_outputs_1052106_1 = nullptr; const ei_impulse_t impulse_1052106_1 = { .project_id = 1052106, .project_owner = "Eoin", .project_name = "Hey Edge - Wake Word / Keyword Spotting (KWS) Model", .impulse_id = 1, .impulse_name = "Impulse #1", .deploy_version = 1, .nn_input_frame_size = 3960, .raw_sample_count = 16000, .raw_samples_per_frame = 1, .dsp_input_frame_size = 16000 * 1, .input_width = 0, .input_height = 0, .input_frames = 0, .interval_ms = 0.0625, .frequency = 16000, .dsp_blocks_size = ei_dsp_blocks_1052106_1_size, .dsp_blocks = ei_dsp_blocks_1052106_1, .learning_blocks_size = ei_learning_blocks_1052106_1_size, .learning_blocks = ei_learning_blocks_1052106_1, .postprocessing_blocks_size = ei_postprocessing_blocks_1052106_1_size, .postprocessing_blocks = ei_postprocessing_blocks_1052106_1, .output_tensors_size = 1, .inferencing_engine = EI_CLASSIFIER_TFLITE, .sensor = EI_CLASSIFIER_SENSOR_MICROPHONE, .fusion_string = "audio", .slice_size = (16000/4), .slices_per_model_window = 4, .has_anomaly = EI_ANOMALY_TYPE_UNKNOWN, .label_count = 3, .categories = ei_classifier_inferencing_categories_1052106_1, .results_type = EI_CLASSIFIER_TYPE_CLASSIFICATION, .freeform_outputs_size = freeform_outputs_1052106_1_size, .freeform_outputs = freeform_outputs_1052106_1 }; ei_impulse_handle_t impulse_handle_1052106_1 = ei_impulse_handle_t( &impulse_1052106_1 ); ei_impulse_handle_t& ei_default_impulse = impulse_handle_1052106_1; constexpr auto& ei_classifier_inferencing_categories = ei_classifier_inferencing_categories_1052106_1; const auto ei_dsp_blocks_size = ei_dsp_blocks_1052106_1_size; ei_model_dsp_t *ei_dsp_blocks = ei_dsp_blocks_1052106_1; #endif // _EI_CLASSIFIER_MODEL_VARIABLES_H_