From b2a712838c08f14e5a462d4a301fc348ccb90566 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Wed, 20 Aug 2025 11:49:12 +0800 Subject: [PATCH] =?utf8?q?uapi=5Fstop=5Ftts=E5=87=BD=E6=95=B0=E8=B0=83?= =?utf8?q?=E7=94=A8=E4=BC=98=E5=8C=96=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=9C=A8?= =?utf8?q?=E6=89=93=E6=96=AD=E5=AF=B9=E8=AF=9D=E6=97=B6=E5=80=99=E6=9C=AA?= =?utf8?q?=E5=8F=8A=E6=97=B6=E8=B0=83=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp | 6 ++++-- .../fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp index 83c078ec7..4e425ef86 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp @@ -1775,13 +1775,13 @@ namespace OHOS static osTimerId_t g_uapi_stop_tts_Handle = nullptr; static void AI4G_UAPI_STOP_TTS_CallbackProc(int data) { - uapi_stop_tts(); AiVoiceModel::GetInstance().stop_uapi_stop_tts_timer(); } static void AI4G_UAPI_STOP_TTS_Callback(int data) { - GraphicService::GetInstance()->PostGraphicEvent(std::bind(AI4G_UAPI_STOP_TTS_CallbackProc, data)); + AI4G_UAPI_STOP_TTS_CallbackProc(data); + // GraphicService::GetInstance()->PostGraphicEvent(std::bind(AI4G_UAPI_STOP_TTS_CallbackProc, data)); } void AiVoiceModel::start_uapi_stop_tts_timer(uint32_t interval) @@ -1832,6 +1832,8 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "osTimerDelete failed, ret = %lx!!", ret); } g_uapi_stop_tts_Handle = nullptr; + uapi_stop_tts(); + // uapi_UI_start_asr(1); } } diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp index b5c3d9757..42062b2dc 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp @@ -348,6 +348,7 @@ namespace OHOS AiVoiceModel::GetInstance().SetIsLimitDisplayed(false); AiVoiceModel::GetInstance().stop_ai4g_tts_play_timer(); AiVoiceModel::GetInstance().stop_update_ai_answer_timer(); + AiVoiceModel::GetInstance().stop_uapi_stop_tts_timer(); break; case AIVOICE_4GSERVICECON_VIEW: @@ -587,6 +588,7 @@ namespace OHOS if (model->GetSelect4gorbt() == AI_SELECT_4G) { AiVoiceModel::GetInstance().stop_ai4g_tts_play_timer(); + AiVoiceModel::GetInstance().stop_uapi_stop_tts_timer(); // usleep(50000); set_clear_queue_stream(1); LOS_Msleep(100); @@ -604,6 +606,7 @@ namespace OHOS if (model->GetSelect4gorbt() == AI_SELECT_4G) { AiVoiceModel::GetInstance().stop_ai4g_tts_play_timer(); + AiVoiceModel::GetInstance().stop_uapi_stop_tts_timer(); set_clear_queue_stream(1); LOS_Msleep(100); dinit_ai_task(); -- 2.17.1