void ln_ws_audio_deinit(void);
+bool ln_ws_is_audio_initialized(void);
+
/* WebSocket状态查询接口 */
int ln_ws_get_connection_state(void);
const char* ln_ws_get_connection_state_string(void);
// 记录接收数据的时间
g_last_binary_data_tick = osKernelGetTickCount();
- if (!is_chat_id_matched()) {
- LN_WS_WARN("Chat ID not matched\n");
- return;
- }
+ // if (!is_chat_id_matched()) {
+ // LN_WS_WARN("Chat ID not matched\n");
+ // return;
+ // }
if (!raw_data || data_len == 0) {
LN_WS_ERROR("Invalid binary data parameters\n");
#ifdef SUPPORT_CAT1_SERVICE
cat1_api_keep_wakeup(1);
cat1_api_wakeup_cat1(1);
+ uapi_cat1_add_cat1_vote();
#endif
old_Start_AIVoice(AIVoiceDataCallback_ln,NULL,&audioParams_in,&audioParams_out,false);
#ifdef SUPPORT_CAT1_SERVICE
cat1_api_keep_wakeup(0);
cat1_api_wakeup_cat1(0);
+ uapi_cat1_remove_cat1_vote();
#endif
// 清除初始化标志位
{
LN_WS_INFO("WebSocket reconnection successful, triggering reconnect success event\n");
- // 触发重连成功事件
- // if (g_ws_message_callback != NULL) {
- // g_ws_message_callback(NULL, WS_CMD_CONNECTED);
- // }
g_ws_connected = WS_STATE_CONNECTED;
LN_WS_INFO("Reconnect success event triggered\n");