1.解决蓝牙和4g同时连接的时候,选择蓝牙AI方式死机问题 1913/1 1913/head 1914/target/1
authorluozheng <1732036298@qq.com>
Wed, 2 Jul 2025 02:53:37 +0000 (10:53 +0800)
committerluozheng <1732036298@qq.com>
Wed, 2 Jul 2025 02:53:37 +0000 (10:53 +0800)
2.添加表冠调节AI音量功能
3.联调4GAi,

18 files changed:
code/sdk/application/wearable/fd230app/CMakeLists.txt
code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceModel.h
code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoicePresenter.h
code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceView.h
code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceVolumeView.h [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AivoiceReturnResultTextView.h
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceSelectView.cpp
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceView.cpp
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceVolumeView.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/Aivoice4gServiceConView.cpp
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AivoiceReturnResultTextView.cpp
code/sdk/application/wearable/fd230app/nativeui/soundandvibration/src/SoundAndVibrationVolumeSettingPresenter.cpp
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/aimodels/aimodels_lingxi.bin [new file with mode: 0644]
code/sdk/drivers/peripheral/slip/cat1Service/cat1_ws.cpp
code/sdk/drivers/peripheral/slip/cat1Service/cat1_ws.h
code/sdk/drivers/peripheral/utils/custom_cmd_service.c

index 1c6084c..7852f4c 100644 (file)
@@ -534,6 +534,7 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/apikeys/SetApiKeysView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/Aivoice4gServiceConView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/AiVoiceSelectView.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/AiVoiceVolumeView.cpp
     
     #Ai Models
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aimodels/src/AiModelsModel.cpp
index 57bc8df..f8b3915 100644 (file)
 // 设置当前使用的音频类型,0 表示 PCM,1 表示 SBC,2 表示 MSBC
 #define CURRENT_AIAUDIO_TYPE AIAUDIO_TYPE_SBC
 
+#if defined(SUPPORT_CHINA_MOBILE_DMP) || defined(SUPPORT_CHINA_MOBILE_AI_REGULATION)
+    #define AI_VOICE_JIUTIAN 1 // 九天版本 
+#else
+    #define AI_VOICE_JIUTIAN 1 // 九天版本 
+#endif
+
+
 namespace OHOS
 {
 #define AI_SELECT_DEFAULT -1
@@ -136,6 +143,8 @@ namespace OHOS
         bool GetInit_4gai_task(void);
         void SetSelect4gorbt(int state);
         int GetSelect4gorbt(void);
+        
+        void cancel_tts_play(void);
 
     private:
         AiVoiceModel();
index 805f00a..257255b 100644 (file)
@@ -12,6 +12,7 @@
 #include "View.h"
 #include "ui_resource_string.h"
 #include "components/ui_time_picker.h"
+#include "components/ui_slider.h"
 #include "ModelListenerSample.h"
 namespace OHOS
 {
@@ -22,6 +23,7 @@ namespace OHOS
                              public UIView::OnDragListener,
                              public RootView::OnKeyActListener,
                              public UIPicker::SelectedListener,
+                             public UIView::OnRotateListener,
                              public UIView::OnTouchListener
                             //  public ModelListenerSample
     {
@@ -54,6 +56,7 @@ namespace OHOS
         void FunctionKeyOnClickToChangeAIModel(void);
         void DragLeftToRightChangeAIModel(void);
         void DragRightToLetfChangeAIModel(void);
+        void ChangeVolume(UIView &view, const RotateEvent &event);
 
     private:
         bool OnClick(UIView &view, const ClickEvent &event) override;
@@ -63,6 +66,8 @@ namespace OHOS
         bool OnDragEnd(UIView &view, const DragEvent &event) override;
         bool OnKeyAct(UIView &view, const KeyEvent &event) override; // 增加按键事件
         void OnPickerStoped(UIPicker &picker) override;
+        bool OnRotate(UIView& view, const RotateEvent& event);
+        bool OnRotateEnd(UIView& view, const RotateEvent& event);
 
         AiVoiceModel *model;
         bool X_DRAG_FLAG{false};
index c8029be..2d743b9 100644 (file)
@@ -15,6 +15,7 @@
 #include "components/ui_scroll_view.h"
 #include "components/ui_image_view.h"
 #include "components/ui_picker.h"
+#include "components/ui_slider.h"
 #include "aivoice/include/AiVoiceBluetoothFailedStartView.h"
 #include "aivoice/include/AivoiceMobileDataFailedStartView.h"
 #include "aivoice/include/AivoiceConnectTimeoutView.h"
@@ -27,6 +28,7 @@
 #include "aivoice/include/AiVoiceConnectingView.h"
 #include "aivoice/include/AiVoiceSelectView.h"
 #include "aivoice/include/Aivoice4gServiceConView.h"
+#include "aivoice/include/AiVoiceVolumeView.h"
 #include "ui_resource_string.h"
 #include "iostream"
 #include "string"
@@ -41,6 +43,7 @@ namespace OHOS
     static constexpr const char *AIMODEL_TONGYI_QIANWEN_PATH = "/user/res/AIVoice/aimodels/aimodes_tongyi_qianwen.bin"; /*通义千问*/
     static constexpr const char *AIMODEL_IFLYTEK_SPARK_PATH = "/user/res/AIVoice/aimodels/aimodes_iflytek_spark.bin";   /*讯飞星火*/
     static constexpr const char *AIMODEL_DEEPSEEK_PATH = "/user/res/AIVoice/aimodels/aimodes_deepseek.bin";             /*deepseek*/
+    static constexpr const char *AIMODEL_LINGXI_PATH = "/user/res/AIVoice/aimodels/aimodels_lingxi.bin";                /*jiutian*/
 
     /*组件ID*/
     static constexpr const char *AIVOICE_START_CHAT_BUTTON_VIEW_ID = "aivoice_start_chat_button_view_id"; // 开始对话
@@ -64,6 +67,7 @@ namespace OHOS
         AIVOICE_AIMODE_CONNECTING,                       // AI Mode正在连接视图
         AIVOICE_SELECT_VIEW,                             // AI选择界面
         AIVOICE_4GSERVICECON_VIEW,                       // AI4G连接中界面
+        AIVOICE_VOLUME_VIEW,                            // AI音量界面
         MAX_AIVOICE_VIEWID,
     } AIVOICEVIEWID;
 
@@ -75,6 +79,7 @@ namespace OHOS
         {STR_DEEPSEEK, AIMODEL_DEEPSEEK_PATH},
         {STR_IFLYTEK_SPARK, AIMODEL_IFLYTEK_SPARK_PATH},
         {STR_AIMODES_CHATGPT, AIMODEL_CHATGPT_ON_PATH},
+        {STR_JIUTIAN, AIMODEL_LINGXI_PATH},
     };
 
     class AiVoicePresenter;
@@ -133,6 +138,7 @@ namespace OHOS
         bool ChangeAiVoicConnectingView(int16_t thisView);
         bool ChangeAiVoicSelectView(int16_t thisView);
         bool ChangeAiVoic4gServiceConView(int16_t thisView);
+        bool ChangeAiVoicVolumeView(int16_t thisView);
 
         void SetAiVoiceViewAllComponentsVisibilityStatus();
         void ChangeAiModelAndUpdateComponentsStatus(void);
@@ -155,6 +161,7 @@ namespace OHOS
         AiVoiceConnectingView *p_AiVoiceConnectingView{nullptr};
         AiVoiceSelectView *p_AiVoiceSelectView{nullptr};
         AiVoice4gServiceConView *p_Aivoice4gServiceConView{nullptr};
+        AiVoiceVolumeView *p_AiVoiceVolumeView{nullptr};
 
     private:
         UILabelExt *AiVoiceViewLabelInit(LabelConfig &labelconfig);
@@ -165,6 +172,7 @@ namespace OHOS
         bool CreateAiVoiceViewButton(void);
         bool CreateAiVoiceViewPicker(void);
         bool CreateAiVoiceScrollView(void);
+        bool CreateAiVoiceVoiceView(void);
         UIScrollView *CreateAiVoiceView(void);
         void ClearAllAiVoiceScrollView(void);
         void ClearAll(void);
@@ -182,6 +190,9 @@ namespace OHOS
         UIButton *apiKeysButton{nullptr};    /*API Keys按钮,,暂时不用*/
         UIPicker *aiModelPicker{nullptr};    /*ai模型选择器*/
         UIScrollView *AiVoiceScrollView[MAX_AIVOICE_VIEWID]{nullptr};
+        /* ----------------------------------- 九天 ----------------------------------- */
+        UISlider *VolumeProcess{nullptr};
+        /* -------------------------------------------------------------------------- */
     };
 }
 #endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceVolumeView.h b/code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceVolumeView.h
new file mode 100644 (file)
index 0000000..b52aa2a
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef AIVOICEVOLUMEVIEW_H
+#define AIVOICEVOLUMEVIEW_H
+
+#include "components/ui_scroll_view.h"
+#include "soundandvibration/include/SoundAndVibrationVolumeSettingView.h"
+namespace OHOS
+{
+    class AiVoiceVolumeView
+    {
+    public:
+        AiVoiceVolumeView();
+        ~AiVoiceVolumeView();
+        static AiVoiceVolumeView *GetInstance(void);
+        UIScrollView *CreateAiVoiceVolumeView(void);
+        void SetRequestFocus();
+
+    private:
+        void ClearAll();
+        UIScrollView *SystemVolumeScrollView{nullptr};
+        SoundAndVibrationVolumeSettingView *p_SoundAndVibrationVolumeSettingView{nullptr};
+    };
+}
+#endif
\ No newline at end of file
index 27d9e34..f3d8408 100644 (file)
@@ -60,6 +60,7 @@ namespace OHOS
         UIList *GetChatContentList(void);
         void UpdateTitleTextId(int textId);
         void IsScrollChatContentList(bool isScroll);
+        void SetRequestFocus();
 
     private:
         void ClearAll(void);
index c3ac034..ad97b1c 100644 (file)
@@ -768,6 +768,7 @@ namespace OHOS
         isLimitDisplayed = false;
         AI_4G_state = false;
         AI_BT_state = false;
+        select4gorbt = -1;
         // init_4gai_task = false;//TOOD:之后需要销毁
         ClearQuestionAndAiAnswerStr();
         StopListenAndRecordingUserQuestion();
@@ -784,6 +785,7 @@ namespace OHOS
             AiVoiceModel::GetInstance().AIVoice_StopTimer();
             AiVoiceModel::GetInstance().SetErrnote("连接超时,请重新开始对话");
             std::string str = AiVoiceModel::GetInstance().GetErrnote();
+            dinit_ai_task(); // 所有服务都删除重新连一下服务器
             SendMsgToUIService(UI_AI_JUMP_TO_RESPONDERR_VIEW, 0, (void *)str.c_str(), str.length());
         }
         else
@@ -983,7 +985,6 @@ namespace OHOS
             if (AiVoiceView::GetInstance() && AivoiceListeningView::GetInstance())
             {
                 AiVoiceView::GetInstance()->ChangeView(AIVOICE_LISTENING_VIEWID, AIVOICE_THINKING_VIEWID); // 切换到思考中界面
-                AiVoiceModel::GetInstance().AIVoice_StartTimer();
             }
         }
         else
@@ -1068,6 +1069,7 @@ namespace OHOS
                 if ((view_->GetAiVoiceScrollView(AIVOICE_AIMODE_CONNECTING) != nullptr) &&
                     (view_->GetAiVoiceScrollView(AIVOICE_AIMODE_CONNECTING)->IsVisible()))
                 {
+                    dinit_ai_task(); // 所有服务都删除重新连一下服务器
                     p_AiVoicePresenter->ChangeViewAndLogicOperator(AIVOICE_AIMODE_CONNECTING, AIVOICE_AIMODEL_CONNECT_FAILED_VIEWID);
                 }
             }
@@ -1151,6 +1153,7 @@ namespace OHOS
                 if ((view_->GetAiVoiceScrollView(AIVOICE_4GSERVICECON_VIEW) != nullptr) &&
                     (view_->GetAiVoiceScrollView(AIVOICE_4GSERVICECON_VIEW)->IsVisible()))
                 {
+                    dinit_ai_task(); // 所有服务都删除重新连一下服务器
                     p_AiVoicePresenter->ChangeViewAndLogicOperator(AIVOICE_4GSERVICECON_VIEW, AIVOICE_AIMODEL_CONNECT_FAILED_VIEWID);
                 }
             }
@@ -1218,7 +1221,7 @@ namespace OHOS
         // 检查定时器是否存在
         if (g_ai4g_is_suc_connected_Handle != nullptr)
         {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceModel::stop_ai_isready_timer");
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceModel::stop_ai4g_connect_timer");
             osTimerStop(g_ai4g_is_suc_connected_Handle);
             // 删除定时器并置为 nullptr
             osStatus_t ret = osTimerDelete(g_ai4g_is_suc_connected_Handle);
@@ -1316,7 +1319,11 @@ namespace OHOS
     // 设置选择的ai模型
     void AiVoiceModel::SetSelectAiModel(int index)
     {
+#if AI_VOICE_JIUTIAN
+        ConfigModel::GetInstance()->SetSelectAiModel(0);
+#else
         ConfigModel::GetInstance()->SetSelectAiModel(index);
+#endif
     }
 
     int AiVoiceModel::GetSelectAiModel(void)
@@ -1346,13 +1353,13 @@ namespace OHOS
     }
     bool AiVoiceModel::GetInit_4gai_task(void)
     {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceModel::GetInit_4gai_task %d", init_4gai_task);
         uint8_t asr_state = 0;
         uint8_t chat_state = 0;
         uint8_t tts_state = 0;
         asr_state = get_ai_asr_service_init_flag();
         chat_state = get_ai_chat_service_init_flag();
         tts_state = get_ai_tts_server_init_flag();
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "asr_state:%d,chat_state:%d,tts_state:%d", asr_state, chat_state, tts_state);
         if ((asr_state == 1) && (chat_state == 1) && (tts_state == 1))
         {
             init_4gai_task = true;
@@ -1372,6 +1379,11 @@ namespace OHOS
     {
         return select4gorbt;
     }
+    // 打断tts播放
+    void AiVoiceModel::cancel_tts_play(void)
+    {
+        tts_server_deinit();
+    }
 
     /*获取已选择的ai模型的textid*/
     int AiVoiceModel::GetAiModelTextId()
@@ -1407,6 +1419,13 @@ namespace OHOS
             textId = STR_AIMODES_CHATGPT;
         }
 #endif
+#if AI_VOICE_JIUTIAN
+        int textId = 0;
+        selectAiModelToTextId = {
+            {0, {STR_JIUTIAN, 5}},
+        };
+        textId = STR_JIUTIAN;
+#else
         // 客户新需求需要改模型顺序:
         int textId = 0;
         selectAiModelToTextId = {
@@ -1425,7 +1444,7 @@ namespace OHOS
         {
             return it->second.first;
         }
-
+#endif
         return textId;
     }
 
index 75e92de..01ffa30 100644 (file)
@@ -168,8 +168,7 @@ namespace OHOS
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoicePresenter::ChangeToAIVoiceListeningView");
         if (model->GetSelect4gorbt() == AI_SELECT_4G)
         {
-            model->stop_ai_isready_timer(); // 停止定时器
-            if (val)                        /*如果查询的AI模型可用跳转到聆听中界面*/
+            if (val) /*如果查询的AI模型可用跳转到聆听中界面*/
             {
                 ChangeViewAndLogicOperator(model->GetCurView(), AIVOICE_LISTENING_VIEWID);
             }
@@ -189,20 +188,19 @@ namespace OHOS
         {
             if (view_->GetAiVoiceScrollView(AIVOICE_AIMODE_CONNECTING) != nullptr && view_->GetAiVoiceScrollView(AIVOICE_AIMODE_CONNECTING)->IsVisible())
             {
-                model->stop_ai_isready_timer(); // 停止定时器
-                if (val)                        /*如果查询的AI模型可用跳转到聆听中界面*/
+                if (val) /*如果查询的AI模型可用跳转到聆听中界面*/
                 {
-                    ChangeViewAndLogicOperator(AIVOICE_AIMODE_CONNECTING, AIVOICE_LISTENING_VIEWID);
+                    ChangeViewAndLogicOperator(model->GetCurView(), AIVOICE_LISTENING_VIEWID);
                 }
                 else
                 {
                     if (model->GetAiModelTextId() == STR_AIMODES_CHATGPT) // 如果当前是在chatgpt模型*/
                     {
-                        ChangeViewAndLogicOperator(AIVOICE_AIMODE_CONNECTING, AIVOICE_NOTSETAPIKEYS); /*开始对话界面->API Keys notset界面*/
+                        ChangeViewAndLogicOperator(model->GetCurView(), AIVOICE_NOTSETAPIKEYS); /*开始对话界面->API Keys notset界面*/
                     }
                     else
                     {
-                        ChangeViewAndLogicOperator(AIVOICE_AIMODE_CONNECTING, AIVOICE_AIMODEL_CONNECT_FAILED_VIEWID);
+                        ChangeViewAndLogicOperator(model->GetCurView(), AIVOICE_AIMODEL_CONNECT_FAILED_VIEWID);
                     }
                 }
             }
@@ -299,34 +297,15 @@ namespace OHOS
         switch (hideView)
         {
         case AIVOICE_STARTCHAT_VIEWID:
-            // if (model->GetAI_4G_state() == true || model->GetAI_BT_state() == true)
-            // {
-            //     model->QuerySelectedAiModelIsConnect(); /*查询用户选择的AI模型是否已经连接*/
-            // }
-            if (showView == AIVOICE_LISTENING_VIEWID)
-            {
-                model->StartListenAndRecordingUserQuestion();
-            }
-            else if (showView == AIVOICE_AIMODE_CONNECTING)
-            {
-                model->start_ai_isready_timer(); /*开启一个查询AI模型是否连接成功定时器*/
-            }
             break;
 
         case AIVOICE_AIMODE_CONNECTING:
-            if (showView == AIVOICE_LISTENING_VIEWID)
-            {
-                model->StartListenAndRecordingUserQuestion();
-            }
+            model->stop_ai_isready_timer(); // 停止定时器
             break;
 
         case AIVOICE_LISTENING_VIEWID:
             model->StopListenAndRecordingUserQuestion();
             model->stop_listening_timer();
-            if (showView == AIVOICE_THINKING_VIEWID) // 聆听中->思考中界面
-            {
-                model->AIVoice_StartTimer();
-            }
             break;
 
         case AIVOICE_THINKING_VIEWID:
@@ -337,21 +316,32 @@ namespace OHOS
             AiVoiceModel::GetInstance().ClearQuestionAndAiAnswerStr(); // 清空上次用户问题和Ai回答字符串
             AiVoiceModel::GetInstance().SetIsClickable(false);
             AiVoiceModel::GetInstance().SetIsLimitDisplayed(false);
-            if (showView == AIVOICE_LISTENING_VIEWID)
-            {
-                model->StartListenAndRecordingUserQuestion();
-            }
-            else if (showView == AIVOICE_AIMODE_CONNECTING)
-            {
-                model->start_ai_isready_timer(); /*开启一个查询AI模型是否连接成功定时器*/
-            }
             break;
-
         default:
             // Handle other cases if needed
             break;
         }
 
+        switch (showView)
+        {
+        case AIVOICE_AIMODE_CONNECTING:
+            model->QuerySelectedAiModelIsConnect();
+            AiVoiceModel::GetInstance().start_ai_isready_timer();
+            break;
+
+        case AIVOICE_LISTENING_VIEWID:
+            AiVoiceModel::GetInstance().StartListenAndRecordingUserQuestion();
+            AiVoiceModel::GetInstance().start_listening_timer();
+            break;
+
+        case AIVOICE_THINKING_VIEWID:
+            AiVoiceModel::GetInstance().AIVoice_StartTimer();
+            break;
+
+        default:
+            break;
+        }
+
         return true;
     }
 
@@ -418,6 +408,14 @@ namespace OHOS
                     // AiVoiceModel::GetInstance().sendAIIsReady();
                 }
             }
+            else if (it->first == AIVOICERETURNRESULTTEXT_RETURN_BUTTON_VIEW_ID)
+            {
+                if (model->GetSelect4gorbt() == AI_SELECT_4G)
+                {
+                    model->cancel_tts_play();
+                    usleep(50000);
+                }
+            }
             ChangeViewAndLogicOperator(it->second.first, it->second.second);
             return true;
         }
@@ -461,10 +459,37 @@ namespace OHOS
 
             model->SetAI_4G_state(netWork4GState);
             model->SetAI_BT_state(appBluetoothConnectState);
-            if (netWork4GState && appBluetoothConnectState)
+            if ((netWork4GState && appBluetoothConnectState))
             {
-                // 用户自行进行选择哪种方式
-                ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_SELECT_VIEW); // LOADING
+                // 获取用户上次的选择
+                int lastSelectedType = model->GetSelect4gorbt();
+                // 两者都可用,检查是否有上次的选择
+                if (lastSelectedType == AI_SELECT_4G)
+                {
+                    // 使用4G
+                    model->SetSelect4gorbt(AI_SELECT_4G);
+                    if (!model->GetInit_4gai_task())
+                    {
+                        init_ai_task();
+                        model->start_ai4g_connect_timer();
+                        ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_4GSERVICECON_VIEW); // LOADING
+                    }
+                    else
+                    {
+                        ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_AIMODE_CONNECTING); // LOADING
+                    }
+                }
+                else if (lastSelectedType == AI_SELECT_BT)
+                {
+                    // 使用蓝牙
+                    model->SetSelect4gorbt(AI_SELECT_BT);
+                    ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_AIMODE_CONNECTING); // LOADING
+                }
+                else
+                {
+                    // 没有上次的选择,让用户选择
+                    ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_SELECT_VIEW); // LOADING
+                }
             }
             else if (netWork4GState) // 1.手表4G网络正常
             {
@@ -478,7 +503,6 @@ namespace OHOS
                 }
                 else
                 {
-                    model->QuerySelectedAiModelIsConnect();
                     ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_AIMODE_CONNECTING); // LOADING
                 }
             }
@@ -486,7 +510,6 @@ namespace OHOS
             {
                 // 通过蓝牙连接APP调用大模型
                 model->SetSelect4gorbt(AI_SELECT_BT);
-                model->QuerySelectedAiModelIsConnect();
                 ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_AIMODE_CONNECTING); // LOADING
             }
             else // 4.两者连接都异常
@@ -510,12 +533,11 @@ namespace OHOS
             {
                 init_ai_task();
                 model->start_ai4g_connect_timer();
-                ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_4GSERVICECON_VIEW); // LOADING
+                ChangeViewAndLogicOperator(model->GetCurView(), AIVOICE_4GSERVICECON_VIEW); // LOADING
             }
             else
             {
-                model->QuerySelectedAiModelIsConnect();                                          /*查询用户选择的AI模型是否已经连接*/
-                ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_AIMODE_CONNECTING); // LOADING
+                ChangeViewAndLogicOperator(model->GetCurView(), AIVOICE_AIMODE_CONNECTING); // LOADING
             }
             return true;
         }
@@ -523,8 +545,8 @@ namespace OHOS
         {
             model->SetSelect4gorbt(AI_SELECT_BT);
             dinit_ai_task();
-            model->QuerySelectedAiModelIsConnect(); /*查询用户选择的AI模型是否已经连接*/
             ChangeViewAndLogicOperator(model->GetCurView(), AIVOICE_AIMODE_CONNECTING);
+            return true;
         }
 
         std::unordered_map<std::string, std::pair<int16_t, int16_t>> viewIdMap = {
@@ -613,6 +635,11 @@ namespace OHOS
                 /*连接超时界面右滑退到AI对话界面*/
                 ChangeViewAndLogicOperator(AIVOICE_SELECT_VIEW, AIVOICE_STARTCHAT_VIEWID);
             }
+            else if (scrollView == view_->GetAiVoiceScrollView(AIVOICE_VOLUME_VIEW))
+            {
+                /*连接超时界面右滑退到AI对话界面*/
+                ChangeViewAndLogicOperator(AIVOICE_VOLUME_VIEW, AIVOICE_STARTCHAT_VIEWID);
+            }
             AiVoicePresenter::X_DRAG_FLAG = false;
         }
         else if (model->GetAiModelTextId() == STR_AIMODES_CHATGPT && event.GetDragDirection() == DragEvent::DIRECTION_BOTTOM_TO_TOP) /*上滑*/
@@ -706,4 +733,55 @@ namespace OHOS
     //     }
     //     return;
     // }
+
+    void AiVoicePresenter::ChangeVolume(UIView &view, const RotateEvent &event)
+    {
+        if ((view_->GetAiVoiceScrollView(AIVOICE_RETURN_RESULT_TEXT_VIEWID) != nullptr) &&
+            (view_->GetAiVoiceScrollView(AIVOICE_RETURN_RESULT_TEXT_VIEWID)->IsVisible()))
+        {
+            UISlider *slider = dynamic_cast<UISlider *>(&view);
+            if (slider)
+            {
+                int value = slider->GetValue();
+                if (value >= 100 || value <= 0)
+                {
+                    return;
+                }
+                if (event.GetRotate() > 0)
+                {
+                    value += 20;
+                    if (value > 100)
+                    {
+                        value = 100;
+                    }
+                }
+                else
+                {
+                    value -= 10;
+                    if (value < 0)
+                    {
+                        value = 0;
+                    }
+                }
+                do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_TYPE_CHANGE_SYSTEM_VOLUME, (void *)(&value), sizeof(value));
+            }
+        }
+    }
+
+    bool AiVoicePresenter::OnRotate(UIView &view, const RotateEvent &event)
+    {
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoicePresenter::OnRotateEnd");
+        ChangeVolume(view,event);
+        return true;
+    }
+
+    bool AiVoicePresenter::OnRotateEnd(UIView &view, const RotateEvent &event)
+    {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoicePresenter::OnRotateEnd");
+        // if (view_->GetAiVoiceScrollView(AIVOICE_STARTCHAT_VIEWID) && view_->GetAiVoiceScrollView(AIVOICE_STARTCHAT_VIEWID)->IsVisible() == true)
+        // {
+        //     ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_VOLUME_VIEW);
+        // }
+        return true;
+    }
 }
\ No newline at end of file
index 87c2aa4..934c242 100644 (file)
@@ -7,10 +7,12 @@ namespace OHOS
     static AiVoiceSelectView *g_pAivoiceSelectView{nullptr};
     AiVoiceSelectView::AiVoiceSelectView()
     {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceSelectView::AiVoiceSelectView");
         g_pAivoiceSelectView = this;
     }
     AiVoiceSelectView::~AiVoiceSelectView()
     {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceSelectView::~AiVoiceSelectView");
         ClearAll();
         g_pAivoiceSelectView = nullptr;
     }
index 7f567a2..d26ea4e 100644 (file)
@@ -41,6 +41,9 @@ namespace OHOS
             delete scrollView;
             scrollView = nullptr;
 
+            delete VolumeProcess;
+            VolumeProcess = nullptr;
+
             delete title;
             title = nullptr;
 
@@ -157,6 +160,11 @@ namespace OHOS
             delete p_Aivoice4gServiceConView;
             p_Aivoice4gServiceConView = nullptr;
         }
+        if (p_AiVoiceVolumeView)
+        {
+            delete p_AiVoiceVolumeView;
+            p_AiVoiceVolumeView = nullptr;
+        }
         for (int i = 0; i < MAX_AIVOICE_VIEWID; i++)
         {
             if (AiVoiceScrollView[i] != nullptr)
@@ -423,20 +431,24 @@ namespace OHOS
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "aiModelPicker new fail!");
                 return false;
             }
+            aiModelPicker->SetPosition(203, 203, 60, 60);
+            aiModelPicker->SetViewId(AIVOICE_PICKER_VIEW_ID);
+            aiModelPicker->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff);
+            aiModelPicker->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
+            aiModelPicker->SetStyle(STYLE_BORDER_RADIUS, 150);
+            aiModelPicker->SetItemHeight(40);
+            aiModelPicker->SetLoopState(true);
+#ifndef AI_VOICE_JIUTIAN
+            aiModelPicker->SetRotateFactor(1.0);
+            aiModelPicker->RequestFocus();
+#endif
+            aiModelPicker->RegisterSelectedListener(presenter_);
+            // 设置文本颜色为透明
+            aiModelPicker->SetTextColor(Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x00), Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x00));
+            const char *uiPicker1Data[] = {"0", "1", "2", "3", "4", "5"};
+            aiModelPicker->SetValues(uiPicker1Data, sizeof(uiPicker1Data) / sizeof(uiPicker1Data[0]));
+            // aiModelPicker->SetVisible(false);//屏蔽picker组件
         }
-        aiModelPicker->SetPosition(203, 203, 60, 60);
-        aiModelPicker->SetViewId(AIVOICE_PICKER_VIEW_ID);
-        aiModelPicker->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff);
-        aiModelPicker->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
-        aiModelPicker->SetStyle(STYLE_BORDER_RADIUS, 150);
-        aiModelPicker->SetItemHeight(40);
-        aiModelPicker->SetLoopState(true);
-        aiModelPicker->SetRotateFactor(1.0);
-        aiModelPicker->RequestFocus();
-        aiModelPicker->RegisterSelectedListener(presenter_);
-        aiModelPicker->SetTextColor(Color::GetColorFromRGBA(0x00, 0x00, 0x00, 0xff), Color::GetColorFromRGBA(0xff, 0x00, 0x00, 0xff));
-        const char *uiPicker1Data[] = {"0", "1", "2", "3", "4", "5"};
-        aiModelPicker->SetValues(uiPicker1Data, sizeof(uiPicker1Data) / sizeof(uiPicker1Data[0]));
 
         return true;
     }
@@ -454,21 +466,54 @@ namespace OHOS
             }
         }
         scrollView->SetPosition(0, 0, 466, 466);
+        scrollView->SetHorizontalScrollState(false);
+        scrollView->SetVerticalScrollState(false);
         scrollView->SetTouchable(true);
         scrollView->SetDraggable(true);
         scrollView->SetOnDragListener(presenter_);
         return true;
     }
 
+    bool AiVoiceView::CreateAiVoiceVoiceView(void)
+    {
+        /* ------------------------------ VolumeProcess ----------------------------- */
+        if (VolumeProcess == nullptr)
+        {
+            VolumeProcess = new UISlider();
+            if (VolumeProcess == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "VolumeProcess new fail");
+                return false;
+            }
+        }
+        VolumeProcess->SetSliderColor(Color::Gray(), Color::Silver());
+        VolumeProcess->SetPosition(-200, 77, 130, 310);
+        VolumeProcess->SetDirection(UISlider::Direction::DIR_BOTTOM_TO_TOP);
+        VolumeProcess->SetRange(100, 0);
+        VolumeProcess->SetStyle(STYLE_BORDER_RADIUS, 100);
+        VolumeProcess->SetBackgroundStyle(STYLE_LINE_CAP, CapType::CAP_ROUND);
+        VolumeProcess->SetForegroundStyle(STYLE_LINE_CAP, CapType::CAP_ROUND);
+        VolumeProcess->SetSliderColor(Color::GetColorFromRGBA(0x19, 0x19, 0x19, 0xff), Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0xff));
+        VolumeProcess->SetForegroundStyle(STYLE_BACKGROUND_OPA, 0xff);
+        VolumeProcess->SetKnobStyle(StyleDefault::GetSliderKnobStyle());
+        VolumeProcess->RequestFocus();
+        VolumeProcess->SetRotateFactor(1.0);
+        // VolumeProcess->SetVisible(false);
+        VolumeProcess->SetOnRotateListener(presenter_);
+        container_->Add(VolumeProcess);
+        return true;
+    }
+
     UIScrollView *AiVoiceView::CreateAiVoiceView(void)
     {
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceView::CreateAiVoiceView");
         if (!CreateAiVoiceScrollView() || !CreateAiVoiceViewImageView() || !CreateAiVoiceViewPicker() ||
-            !CreateAiVoiceViewLabel() || !CreateAiVoiceViewButton())
+            !CreateAiVoiceViewLabel() || !CreateAiVoiceViewButton() || !CreateAiVoiceVoiceView())
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceView::CreateAiVoiceView fail!");
             return nullptr;
         }
+        // scrollView->Add(VolumeProcess);
         scrollView->Add(title);
         scrollView->Add(aiModelPicker);
         scrollView->Add(aiModelImage);
@@ -500,6 +545,9 @@ namespace OHOS
         container_->SetOnClickListener(presenter_);
 
         ChangeView(MAX_AIVOICE_VIEWID, AIVOICE_STARTCHAT_VIEWID);
+#if AI_VOICE_JIUTIAN
+        CreateAiVoiceVoiceView();
+#endif
 
         SetAiVoiceViewAllComponentsVisibilityStatus();
 
@@ -546,6 +594,13 @@ namespace OHOS
             AiVoiceScrollView[thisView] = scrollview;
             container_->Add(AiVoiceScrollView[thisView]);
         }
+        else
+        {
+            if (VolumeProcess)
+            {
+                VolumeProcess->RequestFocus();
+            }
+        }
         if (AiVoiceModel::GetInstance().GetSelect4gorbt() == AI_SELECT_BT)
         {
             AiVoiceModel::GetInstance().CancelCurAIChat();
@@ -657,7 +712,6 @@ namespace OHOS
             p_AivoiceListeningView->GetShowtimeoutLabel()->SetText("10");
             p_AivoiceListeningView->GetShowtimeoutLabel()->Invalidate();
         }
-        AiVoiceModel::GetInstance().start_listening_timer();
         return true;
     }
 
@@ -713,6 +767,10 @@ namespace OHOS
             AiVoiceScrollView[thisView] = scrollview;
             container_->Add(AiVoiceScrollView[thisView]);
         }
+        // if(p_AivoiceReturnResultTextView)
+        // {
+        //     p_AivoiceReturnResultTextView->SetRequestFocus();
+        // }
         return true;
     }
 
@@ -862,6 +920,29 @@ namespace OHOS
         return true;
     }
 
+    bool AiVoiceView::ChangeAiVoicVolumeView(int16_t thisView)
+    {
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceView::ChangeAiVoic4gServiceConView");
+        if (AiVoiceScrollView[thisView] == nullptr)
+        {
+            p_AiVoiceVolumeView = new AiVoiceVolumeView();
+            if (p_AiVoiceVolumeView == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "new AiVoiceScrollView[%d] fail", thisView);
+                return false;
+            }
+            UIScrollView *scrollview = p_AiVoiceVolumeView->CreateAiVoiceVolumeView();
+            if (scrollview == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "new AiVoiceScrollView[%d] fail", thisView);
+                return false;
+            }
+            AiVoiceScrollView[thisView] = scrollview;
+            container_->Add(AiVoiceScrollView[thisView]);
+        }
+        return true;
+    }
+
     struct AiVoiceViewMapper
     {
         const int16_t viewId;
@@ -882,6 +963,7 @@ namespace OHOS
         {AIVOICE_AIMODE_CONNECTING, &AiVoiceView::ChangeAiVoicConnectingView},
         {AIVOICE_SELECT_VIEW, &AiVoiceView::ChangeAiVoicSelectView},
         {AIVOICE_4GSERVICECON_VIEW, &AiVoiceView::ChangeAiVoic4gServiceConView},
+        {AIVOICE_VOLUME_VIEW, &AiVoiceView::ChangeAiVoicVolumeView},
     };
 
     bool AiVoiceView::ClickFunc(int16_t interface)
@@ -932,6 +1014,7 @@ namespace OHOS
         AIVOICE_ALERT_APPBLUETOOTH_AND_4GNETWORK_VIEWID,
         // AIVOICE_STARTCHAT_VIEWID,
         AIVOICE_RETURN_RESULT_TEXT_VIEWID,
+        AIVOICE_VOLUME_VIEW,
     };
 
     void AiVoiceView::DestroyTempView(int16_t hideView)
@@ -1023,6 +1106,13 @@ namespace OHOS
                 p_AivoiceReturnResultTextView = nullptr;
             }
             break;
+        case AIVOICE_VOLUME_VIEW:
+            if (p_AiVoiceVolumeView)
+            {
+                delete p_AiVoiceVolumeView;
+                p_AiVoiceVolumeView = nullptr;
+            }
+            break;
         default:
             break;
         }
diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceVolumeView.cpp b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceVolumeView.cpp
new file mode 100644 (file)
index 0000000..8131719
--- /dev/null
@@ -0,0 +1,77 @@
+#include "aivoice/include/AiVoiceVolumeView.h"
+#include "aivoice/include/AiVoicePresenter.h"
+#include "wearable_log.h"
+#include <custom_utils.h>
+namespace OHOS
+{
+    static AiVoiceVolumeView *g_pAiVoiceVolumeView{nullptr};
+    AiVoiceVolumeView::AiVoiceVolumeView()
+    {
+        g_pAiVoiceVolumeView = this;
+    }
+
+    AiVoiceVolumeView::~AiVoiceVolumeView()
+    {
+        ClearAll();
+        g_pAiVoiceVolumeView = nullptr;
+    }
+
+    AiVoiceVolumeView *AiVoiceVolumeView::GetInstance(void)
+    {
+        return g_pAiVoiceVolumeView;
+    }
+
+    void AiVoiceVolumeView::ClearAll()
+    {
+        delete p_SoundAndVibrationVolumeSettingView;
+        p_SoundAndVibrationVolumeSettingView = nullptr;
+        SystemVolumeScrollView = nullptr;
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemVolumeView::ClearAll end!!");
+    }
+    void AiVoiceVolumeView::SetRequestFocus()
+    {
+        if (p_SoundAndVibrationVolumeSettingView->GetVolumeProcess())
+        {
+            p_SoundAndVibrationVolumeSettingView->GetVolumeProcess()->RequestFocus();
+        }
+    }
+
+    UIScrollView *AiVoiceVolumeView::CreateAiVoiceVolumeView(void)
+    {
+        if (p_SoundAndVibrationVolumeSettingView == nullptr)
+        {
+            p_SoundAndVibrationVolumeSettingView = new SoundAndVibrationVolumeSettingView(SYSTEM_VOLUME);
+            if (p_SoundAndVibrationVolumeSettingView == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "p_SoundAndVibrationVolumeSettingView is nullptr!");
+                return nullptr;
+            }
+        }
+        if (SystemVolumeScrollView == nullptr)
+        {
+            SystemVolumeScrollView = p_SoundAndVibrationVolumeSettingView->SetUpVolumeProcess();
+            if (SystemVolumeScrollView == nullptr)
+            {
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemVolumeScrollView is nullptr!");
+                return nullptr;
+            }
+        }
+
+        SetRequestFocus();
+
+        int SystemVolume = uapi_systemVolumeGet();
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemVolume = %d", SystemVolume);
+        p_SoundAndVibrationVolumeSettingView->GetVolumeProcess()->SetValue(SystemVolume);
+
+        UIView::OnDragListener *dragListener = static_cast<UIView::OnDragListener *>(AiVoicePresenter::GetInstance());
+        if (dragListener == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AivoiceThinkingView::dragListener new fail!");
+            return nullptr;
+        }
+        SystemVolumeScrollView->SetOnDragListener(dragListener);
+
+        return SystemVolumeScrollView;
+    }
+
+}
\ No newline at end of file
index 55eba42..f51a412 100644 (file)
@@ -55,8 +55,16 @@ namespace OHOS
             scrollView->RemoveAll();
             delete label;
             label = nullptr;
-            delete AI4GImageAni;
-            AI4GImageAni = nullptr;
+            if (AI4GImageAni)
+            {
+                AI4GImageAni->Stop();
+                delete AI4GImageAni;
+                AI4GImageAni = nullptr;
+                for (int i = 0; i < 8; i++)
+                {
+                    ImageCacheManager::GetInstance().UnloadSingleRes(AI4GsearchImagePath[i]);
+                }
+            }
             delete scrollView;
             scrollView = nullptr;
         }
index 6f01410..62b50ae 100644 (file)
@@ -115,6 +115,13 @@ namespace OHOS
             scrollView = nullptr;
         }
     }
+    void AivoiceReturnResultTextView::SetRequestFocus()
+    {
+        if (chatContentList)
+        {
+            chatContentList->RequestFocus();
+        }
+    }
 
     UILabelExt *AivoiceReturnResultTextView::AivoiceReturnResultTextLabelInit(LabelConfig &labelconfig)
     {
@@ -126,11 +133,11 @@ namespace OHOS
         label->SetPosition(labelconfig.left, labelconfig.top, labelconfig.width, labelconfig.height);
         label->SetStyle(STYLE_TEXT_FONT, labelconfig.fontSize);
         label->SetStyle(STYLE_LINE_HEIGHT, labelconfig.lineHeight);
-        //TOOD: 待优化
-        // if(labelconfig.textId == STR_DEEPSEEK) {
-        //     label->SetText("DeepSeek");
-        // } else
-            label->SetTextId(labelconfig.textId);
+        // TOOD: 待优化
+        //  if(labelconfig.textId == STR_DEEPSEEK) {
+        //      label->SetText("DeepSeek");
+        //  } else
+        label->SetTextId(labelconfig.textId);
         label->SetLineBreakMode(labelconfig.lineBreakMode);
         label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
         label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelconfig.fontSize);
@@ -179,6 +186,7 @@ namespace OHOS
         scrollView->SetTouchable(true);
         scrollView->SetDraggable(true);
         scrollView->SetDirection(UIScrollView::VERTICAL);
+        scrollView->IsIntercept();
 
         return true;
     }
@@ -256,8 +264,8 @@ namespace OHOS
         chatContentList->SetMaxScrollDistance(MAX_SCR_DIS);
         chatContentList->SetSwipeACCLevel(200); // 800: compensation distance
         chatContentList->SetDragACCLevel(5);    // 5: drag acceleration
-        chatContentList->SetRotateFactor(2);
-        chatContentList->RequestFocus();
+        // chatContentList->SetRotateFactor(2);
+        // chatContentList->RequestFocus();
         // chatContentList->SetIntercept(true);
         chatContentList->SetAdapter(chatContentListAdapter);
         chatContentList->RefreshList();
@@ -356,8 +364,8 @@ namespace OHOS
             // if(textId == STR_DEEPSEEK)
             // {
             //     title->SetText("DeepSeek");
-            // } 
-            // else 
+            // }
+            // else
             // {
             title->SetTextId(textId);
             title->ForceResetText();
index 4923e93..5a9db28 100644 (file)
@@ -221,10 +221,11 @@ extern "C"
      */
     void SystemVolumeSet(int32_t sounding)
     {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemVolumeSet %d", sounding);
+        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SystemVolumeSet %d", sounding);
         Audio::AudioManager::GetInstance().SetVolume(AUDIO_STREAM_MUSIC, sounding); // 系统音量设置
         Audio::AudioManager::GetInstance().SetVolume(AUDIO_STREAM_NOTIFICATION_SYSTEM, sounding); // 查找手表,闹钟,倒计时铃声也受系统音量控制
         Audio::AudioManager::GetInstance().SetVolume(AUDIO_STREAM_RING, sounding); //来电铃声
+        Audio::AudioManager::GetInstance().SetVolume(AUDIO_STREAM_VOICE_ASSISTANT, sounding); //AI语言
     }
 
     int SystemVolumeGet(void)
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/aimodels/aimodels_lingxi.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/AIVoice/aimodels/aimodels_lingxi.bin
new file mode 100644 (file)
index 0000000..0c4bb19
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:33763925d0358af3d2f1e4c6cb8fbf5c5c8190a918a5a86636a4dafbfaf86d80
+size 9624
index 1b6c2b4..bce9422 100644 (file)
@@ -913,7 +913,7 @@ errcode_t chat_server_init(void);
 
 errcode_t tts_server_init(void);
 
-void tts_server_deinit(void);
+// void tts_server_deinit(void);
 
 
 void uapi_UI_start_asr(void)
index 15e3ad7..a7a8a7c 100644 (file)
@@ -22,7 +22,7 @@ void uapi_UI_stop_start_asr_timeout(void);
 ////////////////////////////////////////////////////////////////////////
 
 
-
+void tts_server_deinit(void);
 
 
 
index 1e2f9b5..89dba3a 100644 (file)
@@ -163,7 +163,7 @@ static void custom_cmd_service_check_task(void const *arg)
                 {
                     value |= (mail.data[i] << (i * 8));
                 }
-                    printf("uapi_systemVolumeSet: %d\n", value);
+                    // printf("uapi_systemVolumeSet: %d\n", value);
                     uapi_systemVolumeSet(value);
             }
             break;
@@ -175,7 +175,7 @@ static void custom_cmd_service_check_task(void const *arg)
                 {
                     value |= (mail.data[i] << (i * 8));
                 }
-                    printf("uapi_callVolumeSet: %d\n", value);
+                    // printf("uapi_callVolumeSet: %d\n", value);
                     uapi_callVolumeSet(value);
             }
             break;