1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-18 07:45:56 +00:00

Merge branch 'integration' into memory_api

This commit is contained in:
J. Nick Koston
2025-11-04 22:21:45 -06:00

View File

@@ -657,7 +657,8 @@ void VoiceAssistant::on_event(const api::VoiceAssistantEventResponse &msg) {
ESP_LOGW(TAG, "No text in STT_END event"); ESP_LOGW(TAG, "No text in STT_END event");
return; return;
} else if (text.length() > 500) { } else if (text.length() > 500) {
text = text.substr(0, 497) + "..."; text.resize(497);
text += "...";
} }
ESP_LOGD(TAG, "Speech recognised as: \"%s\"", text.c_str()); ESP_LOGD(TAG, "Speech recognised as: \"%s\"", text.c_str());
this->defer([this, text]() { this->stt_end_trigger_->trigger(text); }); this->defer([this, text]() { this->stt_end_trigger_->trigger(text); });
@@ -714,7 +715,8 @@ void VoiceAssistant::on_event(const api::VoiceAssistantEventResponse &msg) {
return; return;
} }
if (text.length() > 500) { if (text.length() > 500) {
text = text.substr(0, 497) + "..."; text.resize(497);
text += "...";
} }
ESP_LOGD(TAG, "Response: \"%s\"", text.c_str()); ESP_LOGD(TAG, "Response: \"%s\"", text.c_str());
this->defer([this, text]() { this->defer([this, text]() {