合并
authorhcj <1224667075@qq.com>
Mon, 15 Sep 2025 07:22:47 +0000 (15:22 +0800)
committerhcj <1224667075@qq.com>
Mon, 15 Sep 2025 07:22:47 +0000 (15:22 +0800)
1  2 
code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp

@@@ -1991,35 -1958,21 +1958,38 @@@ extern "C
          return 0;
      }
  
-     static uint8_t clear_queue_stream = 0;
-     uint8_t get_clear_queue_stream(void)
+ #ifdef BLE_INSTRUCT
+ 
+ #include "bleEvent.h"
+ #include "bleInstruct.h"
+ 
+     void ble_set_ai_Question_str_(char *buf)
      {
-         return clear_queue_stream;
+         OHOS::AiVoiceModel::GetInstance().SetUserQuestionStr(std::string(buf));
      }
  
-     // 清空队列中可能存在的音频数据
-     void set_clear_queue_stream(uint8_t state)
+     void ble_set_ai_Answer_str_(char *buf, uint8_t type)
      {
-         clear_queue_stream = state;
+         OHOS::AiVoiceModel::GetInstance().SetAiAnswerStrStr(std::string(buf), type);
      }
  
 +
 +    #ifdef BLE_INSTRUCT
 +
 +    #include "bleEvent.h"
 +    #include "bleInstruct.h"
 +
 +    void ble_set_ai_Question_str_(char *buf)
 +    {
 +        OHOS::AiVoiceModel::GetInstance().SetUserQuestionStr(std::string(buf));
 +    }
 +
 +
 +    void ble_set_ai_Answer_str_(char *buf,uint8_t type)
 +    {
 +        OHOS::AiVoiceModel::GetInstance().SetAiAnswerStrStr(std::string(buf),type);
 +    }
 +
      extern bleInstruct_t_ bleInstruct_t;
  
      void ble_AI_init(void)