1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-24 22:22:22 +01:00

[voice_assistant] Don't allocate buffers until starting the microphone for the first time (#6800)

This commit is contained in:
Jesse Hills
2024-05-25 07:42:24 +12:00
committed by GitHub
parent 9d03f47233
commit 863bee28d9
2 changed files with 83 additions and 17 deletions

View File

@@ -151,6 +151,10 @@ class VoiceAssistant : public Component {
void set_wake_word(const std::string &wake_word) { this->wake_word_ = wake_word; }
protected:
bool allocate_buffers_();
void clear_buffers_();
void deallocate_buffers_();
int read_microphone_();
void set_state_(State state);
void set_state_(State state, State desired_state);