diff --git a/esphome/components/micro_wake_word/micro_wake_word.cpp b/esphome/components/micro_wake_word/micro_wake_word.cpp index f4b4959..826e4b9 100644 --- a/esphome/components/micro_wake_word/micro_wake_word.cpp +++ b/esphome/components/micro_wake_word/micro_wake_word.cpp @@ -350,23 +350,6 @@ void MicroWakeWord::loop() { } } -void MicroWakeWord::enable_wake_words(std::vector &wake_words_to_enable) { - // Disable and unload all models - for (auto &model : this->wake_word_models_) { - model->disable(); - } - - delay(20); // make sure the models have actually unloaded - - for (auto &model : this->wake_word_models_) { - for (auto &wake_word : wake_words_to_enable) { - if (!model->get_wake_word().compare(wake_word)) { - model->enable(); - } - } - } -} - void MicroWakeWord::start() { if (!this->is_ready()) { ESP_LOGW(TAG, "Wake word detection can't start as the component hasn't been setup yet"); diff --git a/esphome/components/micro_wake_word/micro_wake_word.h b/esphome/components/micro_wake_word/micro_wake_word.h index b352ef7..321b358 100644 --- a/esphome/components/micro_wake_word/micro_wake_word.h +++ b/esphome/components/micro_wake_word/micro_wake_word.h @@ -57,10 +57,6 @@ class MicroWakeWord : public Component { // Since these are pointers to the WakeWordModel objects, the voice assistant component can enable or disable them const std::vector &get_wake_words() const { return this->wake_word_models_; } - // Enables the wake word phrases given as strings in a vector. Disables any wake words not listed in the vector - // TODO: Should this logic be in the voice_assistant component? - void enable_wake_words(std::vector &wake_words_to_enable); - protected: microphone::Microphone *microphone_{nullptr}; Trigger *wake_word_detected_trigger_ = new Trigger();