Commit 6d7955e 1 parent 5bac677 commit 6d7955e Copy full SHA for 6d7955e
File tree 1 file changed +6
-0
lines changed
esphome/components/voice_assistant
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -896,6 +896,7 @@ void VoiceAssistant::on_announce(const api::VoiceAssistantAnnounceRequest &msg)
896
896
}
897
897
898
898
void VoiceAssistant::on_set_configuration (const std::vector<std::string> &active_wake_words) {
899
+ #ifdef USE_MICRO_WAKE_WORD
899
900
if (this ->micro_wake_word_ ) {
900
901
// Disable all wake words first
901
902
for (auto &model : this ->micro_wake_word_ ->get_wake_words ()) {
@@ -912,12 +913,14 @@ void VoiceAssistant::on_set_configuration(const std::vector<std::string> &active
912
913
}
913
914
}
914
915
}
916
+ #endif
915
917
};
916
918
917
919
const Configuration &VoiceAssistant::get_configuration () {
918
920
this ->config_ .available_wake_words .clear ();
919
921
this ->config_ .active_wake_words .clear ();
920
922
923
+ #ifdef USE_MICRO_WAKE_WORD
921
924
if (this ->micro_wake_word_ ) {
922
925
this ->config_ .max_active_wake_words = 1 ;
923
926
@@ -935,9 +938,12 @@ const Configuration &VoiceAssistant::get_configuration() {
935
938
this ->config_ .available_wake_words .push_back (std::move (wake_word));
936
939
}
937
940
} else {
941
+ #endif
938
942
// No microWakeWord
939
943
this ->config_ .max_active_wake_words = 0 ;
944
+ #ifdef USE_MICRO_WAKE_WORD
940
945
}
946
+ #endif
941
947
942
948
return this ->config_ ;
943
949
};
You can’t perform that action at this time.
0 commit comments