|
|
@@ -427,17 +427,10 @@ void Application::Start() {
|
|
|
if (text != NULL) {
|
|
|
ESP_LOGI(TAG, "<< %s", text->valuestring);
|
|
|
std::string message = text->valuestring;
|
|
|
- // Schedule([this, display, message = std::string(text->valuestring)]() {
|
|
|
- // display->SetChatMessage("assistant", message.c_str());
|
|
|
- // });
|
|
|
- // 简化去重:只对比上一次显示的消息
|
|
|
if (message != last_displayed_message_) {
|
|
|
- Schedule([this, display, message]() {
|
|
|
- display->SetChatMessage("assistant", message.c_str());
|
|
|
- last_displayed_message_ = message; // 更新上一次显示的消息
|
|
|
- });
|
|
|
+ last_displayed_message_ = message; // 更新上一次显示的消息
|
|
|
+ display->SetChatMessage("assistant", message.c_str());
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
} else if (strcmp(type->valuestring, "stt") == 0) {
|