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

[api] Implement zero-copy string optimization for outgoing protobuf messages (#9790)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2025-07-22 07:33:03 -10:00
committed by GitHub
parent 71cb429a86
commit a614a68f1a
17 changed files with 863 additions and 628 deletions

View File

@@ -238,10 +238,10 @@ void VoiceAssistant::loop() {
api::VoiceAssistantRequest msg;
msg.start = true;
msg.conversation_id = this->conversation_id_;
msg.set_conversation_id(StringRef(this->conversation_id_));
msg.flags = flags;
msg.audio_settings = audio_settings;
msg.wake_word_phrase = this->wake_word_;
msg.set_wake_word_phrase(StringRef(this->wake_word_));
this->wake_word_ = "";
// Reset media player state tracking