Add stream start and end events (#5545)

This commit is contained in:
Jesse Hills
2023-10-17 17:18:05 +13:00
parent 97d624114d
commit 61cf566560
6 changed files with 81 additions and 5 deletions
@@ -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};