1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-14 01:02:19 +01:00

Add stream start and end events (#5545)

This commit is contained in:
Jesse Hills
2023-10-17 17:18:05 +13:00
committed by GitHub
parent e42c51a222
commit 4913b3cc35
6 changed files with 81 additions and 5 deletions

View File

@@ -46,6 +46,7 @@ enum class State {
STOPPING_MICROPHONE,
AWAITING_RESPONSE,
STREAMING_RESPONSE,
RESPONSE_FINISHED,
};
class VoiceAssistant : public Component {
@@ -132,10 +133,10 @@ class VoiceAssistant : public Component {
uint8_t *speaker_buffer_;
size_t speaker_buffer_index_{0};
size_t speaker_buffer_size_{0};
bool wait_for_stream_end_{false};
#endif
#ifdef USE_MEDIA_PLAYER
media_player::MediaPlayer *media_player_{nullptr};
bool playing_tts_{false};
#endif
bool local_output_{false};