Performance enhancements for ESPHome + Voice Assistant + i2s Audio

Performance enhancements for ESPHome + Voice Assistant + i2s Audio

I’m posting this as a characteristic request to “sum up” the myriad of points posted right here and there concerning the aforementioned mixture.
After perusing the codebase concerned, I can consider a number of gadgets that would use a number of pair of eyes… This record is probably going non-exhaustive, however I solely have two eyes myself… :smile:

Please don’t publish points right here, to maintain this thread about doable enhancements.

ESP32-audioI2S library

https://github.com/esphome/ESP32-audioI2S

The library is a couple of yr behind the authentic when it comes to commits (a whole bunch since).
Of curiosity, a number of optimizations with the utilization of psram which would appear helpful with newer boards.

i2saudio / media_player element

https://esphome.io/parts/media_player/i2s_audio

Unavailable with esp-idf framework.
speaker is simply too “disconnected” from Home Assistant for my part, particularly for a voice assistant.
Makes esp-adf unusable with media_player; I didn’t dig into what it will convey to the desk although.

Other

The voice pipeline setup is a bit messy, begin, start_continuous, cease, use_wake_word; all of it appears a bit “disconnected”. How about some higher-level capabilities to maintain stopping any energetic state and switching to the specified one (hear as soon as with out wake phrase / hear for wake phrase)? And a use_wake_word change that routinely calls the correct capabilities (on the proper time), to keep away from messing with init progress, on_client_connected & different such mechanisms to keep away from errors on boot; and that shuts down the voice pipeline appropriately by itself when deactivated. Ideally for the use_wake_word config, the worth could possibly be both true/false, or the ID of a template change (to hyperlink its worth instantly).

The voice pipeline additionally throws loads of errors when it doesn’t appear warranted (like “wake phrase not detected” on deactivation of use_wake_word). Likely linked to the aforementioned “disconnect” between processes.

Bonus: TTS queueing, though simple sufficient to implement with a few wait templates (however requiring a little bit of yaml…), may actually be dealt with higher at a decrease degree.

1 publish – 1 participant

Read full matter

HI-FI News

through Home Assistant Community – Latest matters https://ift.tt/oGF3SaO

December 22, 2023 at 08:26PM