ESPHome 2025.5.0
Loading...
Searching...
No Matches
preprocessor_settings.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef USE_ESP_IDF
4
5#include <cstdint>
6
7namespace esphome {
8namespace micro_wake_word {
9
10// Settings for controlling the spectrogram feature generation by the preprocessor.
11// These must match the settings used when training a particular model.
12// All microWakeWord models have been trained with these specific paramters.
13
14// The number of features the audio preprocessor generates per slice
15static const uint8_t PREPROCESSOR_FEATURE_SIZE = 40;
16// Duration of each slice used as input into the preprocessor
17static const uint8_t FEATURE_DURATION_MS = 30;
18
19static const float FILTERBANK_LOWER_BAND_LIMIT = 125.0;
20static const float FILTERBANK_UPPER_BAND_LIMIT = 7500.0;
21
22static const uint8_t NOISE_REDUCTION_SMOOTHING_BITS = 10;
23static const float NOISE_REDUCTION_EVEN_SMOOTHING = 0.025;
24static const float NOISE_REDUCTION_ODD_SMOOTHING = 0.06;
25static const float NOISE_REDUCTION_MIN_SIGNAL_REMAINING = 0.05;
26
27static const bool PCAN_GAIN_CONTROL_ENABLE_PCAN = true;
28static const float PCAN_GAIN_CONTROL_STRENGTH = 0.95;
29static const float PCAN_GAIN_CONTROL_OFFSET = 80.0;
30static const uint8_t PCAN_GAIN_CONTROL_GAIN_BITS = 21;
31
32static const bool LOG_SCALE_ENABLE_LOG = true;
33static const uint8_t LOG_SCALE_SCALE_SHIFT = 6;
34} // namespace micro_wake_word
35} // namespace esphome
36
37#endif
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7