1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-09 21:33:48 +01:00

Voice Assistant improvements (#5827)

This commit is contained in:
Jesse Hills
2023-11-27 13:45:26 +13:00
committed by GitHub
parent 0a7d3c367b
commit 1324d9e39a
5 changed files with 78 additions and 39 deletions

View File

@@ -220,6 +220,8 @@ size_t I2SAudioSpeaker::play(const uint8_t *data, size_t length) {
return index;
}
bool I2SAudioSpeaker::has_buffered_data() const { return uxQueueMessagesWaiting(this->buffer_queue_) > 0; }
} // namespace i2s_audio
} // namespace esphome

View File

@@ -56,6 +56,8 @@ class I2SAudioSpeaker : public Component, public speaker::Speaker, public I2SAud
size_t play(const uint8_t *data, size_t length) override;
bool has_buffered_data() const override;
protected:
void start_();
// void stop_();