* @Author: luozheng 1732036298@qq.com
* @Date: 2024-06-20 15:14:50
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-19 18:26:01
+ * @LastEditTime: 2024-10-22 17:30:40
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp
*/
#include "aivoice/include/AiVoiceModel.h"
if (errnote.empty()) // 如果没有回应数据
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceModel::GetErrnote is empty!!");
- AiVoiceModel::GetInstance().SetErrnote("response data is empty");
+ AiVoiceModel::GetInstance().SetErrnote("响应内容为空");
std::string str = AiVoiceModel::GetInstance().GetErrnote();
SendMsgToUIService(UI_AI_JUMP_TO_RESPONDERR_VIEW, 0, (void *)str.c_str(), str.length());
return;
if (Time < 0) // 如果思考时间超时30s,进入连接超时界面
{
AiVoiceModel::GetInstance().AIVoice_StopTimer();
- AiVoiceModel::GetInstance().SetErrnote("The connection timed out. Please restart the conversation");
+ AiVoiceModel::GetInstance().SetErrnote("连接超时,请重新开始对话");
std::string str = AiVoiceModel::GetInstance().GetErrnote();
SendMsgToUIService(UI_AI_JUMP_TO_RESPONDERR_VIEW, 0, (void *)str.c_str(), str.length());
}
// 蓝牙的连接状态判断,如果AI思考过程中途断连,直接弹窗提示,不在硬等
if (get_ble_connect() == false)
{
- AiVoiceModel::GetInstance().SetErrnote("ble is disconnected");
+ AiVoiceModel::GetInstance().SetErrnote("手机蓝牙已断开");
std::string str = AiVoiceModel::GetInstance().GetErrnote();
SendMsgToUIService(UI_AI_JUMP_TO_RESPONDERR_VIEW, 0, (void *)str.c_str(), str.length());
}