#ifdef __cplusplus
extern "C" {
#endif
+
+#include "../../../../config/watch/lv_watch_conf_CUSTOM.h"
+
+#ifdef __MMI_CUSTOM_AIGC_SUPPORT__
+
typedef unsigned long UINT32;
#define sim_portTICK_RATE_MS 1000
esp_err_t chat_websocket_register_events(sim_esp_websocket_client_handle_t client,
sim_esp_event_handler_t event_handler);
+#endif
#ifdef __cplusplus
}
#ifdef __cplusplus
extern "C" {
#endif
+
+#include "../../../../config/watch/lv_watch_conf_CUSTOM.h"
+
+#ifdef __MMI_CUSTOM_AIGC_SUPPORT__
+
typedef unsigned long UINT32;
#define sim_portTICK_RATE_MS 1000
esp_err_t tts_websocket_register_events(sim_esp_websocket_client_handle_t client,
sim_esp_event_handler_t event_handler);
+#endif
#ifdef __cplusplus
}
extern "C" {
#endif
-#if 1 // def __MMI_CUSTOM_AIGC_SUPPORT__
+#include "../../../../config/watch/lv_watch_conf_CUSTOM.h"
+
+#ifdef __MMI_CUSTOM_AIGC_SUPPORT__
#define __MMI_AIGC_WB_DEBUG__
#ifdef __cplusplus
extern "C" {
#endif
+
+#include "../../../../config/watch/lv_watch_conf_CUSTOM.h"
+
+#ifdef __MMI_CUSTOM_AIGC_SUPPORT__
+
typedef unsigned long UINT32;
#define sim_portTICK_RATE_MS 1000
esp_err_t sim_esp_websocket_register_events(sim_esp_websocket_client_handle_t client,
sim_esp_event_handler_t event_handler);
+#endif
#ifdef __cplusplus
}
-#if 1 // def __MMI_CUSTOM_AIGC_SUPPORT__
-
#include "uart.h"
#include "mmi_aigc_chat_websocket_client.h"
#include "mmi_aigc_websocket.h"
+
+#ifdef __MMI_CUSTOM_AIGC_SUPPORT__
+
//#define MMI_AIGC_CHAT_WEBSOCKET_URI "ws://121.40.67.151:9099/chat/ws"
-#define MMI_AIGC_CHAT_WEBSOCKET_URI "ws://118.145.158.207:80/chat/ws"
+//#define MMI_AIGC_CHAT_WEBSOCKET_URI "ws://118.145.158.207:80/chat/ws"
+#define MMI_AIGC_CHAT_WEBSOCKET_URI "ws://amp.raisound.com/chat/ws"
static sim_esp_websocket_client_handle_t s_aigc_chat_ws_client_p = NULL;
extern void mmi_aigc_chat_websocket_recv_data_handler(char * data_ptr, int data_len, int payload_len, int payload_offset);
-
+#ifdef __MMI_CUSTOM_AI_AUTHENTICATE_SUPPORT__
+extern char * mmi_ai_device_token_get(void);
+#endif
int mmi_aigc_chat_websocket_send_text_data(char * data_ptr, int data_len)
int ret = 0;
sim_esp_websocket_client_config_t websocket_cfg = {0};
+#ifdef __MMI_CUSTOM_AI_AUTHENTICATE_SUPPORT__
+ char url_str[256] = {0};
+ sprintf(url_str, "%s?dt=%s", MMI_AIGC_CHAT_WEBSOCKET_URI, mmi_ai_device_token_get());
+
+ websocket_cfg.uri = url_str;
+#else
websocket_cfg.uri = MMI_AIGC_CHAT_WEBSOCKET_URI;
+#endif
AIGC_WB_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: url=%s\n", __FUNCTION__, __LINE__, websocket_cfg.uri);
#include "sockets.h"
#include "osa.h"
+#ifdef __MMI_CUSTOM_AIGC_SUPPORT__
+
static int task_run = 0;
static OSTaskRef chat_websocket_client_ref = NULL;
static void * chat_websocket_client_stack_ptr = NULL;
client->handler = event_handler;
return 0;
}
+
+#endif
+
-#if 1 // def __MMI_CUSTOM_AIGC_SUPPORT__
-
#include "uart.h"
#include "sim_esp_websocket_client.h"
#include "mmi_aigc_websocket.h"
+
+#ifdef __MMI_CUSTOM_AIGC_SUPPORT__
+
//#define MMI_AIGC_TRANS_WEBSOCKET_URI "ws://121.40.67.151:9099/asr/ws"
-#define MMI_AIGC_TRANS_WEBSOCKET_URI "ws://118.145.158.207:80/asr/ws"
+//#define MMI_AIGC_TRANS_WEBSOCKET_URI "ws://118.145.158.207:80/asr/ws"
+#define MMI_AIGC_TRANS_WEBSOCKET_URI "ws://amp.raisound.com/asr/ws"
static sim_esp_websocket_client_handle_t s_aigc_trans_ws_client_p = NULL;
extern void mmi_aigc_trans_websocket_recv_data_handler(char * data_ptr, int data_len, int payload_len, int payload_offset);
-
+#ifdef __MMI_CUSTOM_AI_AUTHENTICATE_SUPPORT__
+extern char * mmi_ai_device_token_get(void);
+#endif
int mmi_aigc_trans_websocket_send_text_data(char * data_ptr, int data_len)
int ret = 0;
sim_esp_websocket_client_config_t websocket_cfg = {0};
+#ifdef __MMI_CUSTOM_AI_AUTHENTICATE_SUPPORT__
+ char url_str[256] = {0};
+ sprintf(url_str, "%s?dt=%s", MMI_AIGC_TRANS_WEBSOCKET_URI, mmi_ai_device_token_get());
+
+ websocket_cfg.uri = url_str;
+#else
websocket_cfg.uri = MMI_AIGC_TRANS_WEBSOCKET_URI;
+#endif
AIGC_WB_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: url=%s\n", __FUNCTION__, __LINE__, websocket_cfg.uri);
-#if 1 // def __MMI_CUSTOM_AIGC_SUPPORT__
-
#include "uart.h"
#include "mmi_aigc_tts_websocket_client.h"
#include "mmi_aigc_websocket.h"
+
+#ifdef __MMI_CUSTOM_AIGC_SUPPORT__
+
//#define MMI_AIGC_TTS_WEBSOCKET_URI "ws://121.40.67.151:9099/tts/stream"
-#define MMI_AIGC_TTS_WEBSOCKET_URI "ws://118.145.158.207:80/tts/stream"
+//#define MMI_AIGC_TTS_WEBSOCKET_URI "ws://118.145.158.207:80/tts/stream"
+#define MMI_AIGC_TTS_WEBSOCKET_URI "ws://amp.raisound.com/tts/stream"
static sim_esp_websocket_client_handle_t s_aigc_tts_ws_client_p = NULL;
extern void mmi_aigc_tts_websocket_recv_data_handler(char * data_ptr, int data_len, int payload_len, int payload_offset);
-
+#ifdef __MMI_CUSTOM_AI_AUTHENTICATE_SUPPORT__
+extern char * mmi_ai_device_token_get(void);
+#endif
int mmi_aigc_tts_websocket_send_text_data(char * data_ptr, int data_len)
int ret = 0;
sim_esp_websocket_client_config_t websocket_cfg = {0};
+#ifdef __MMI_CUSTOM_AI_AUTHENTICATE_SUPPORT__
+ char url_str[256] = {0};
+ sprintf(url_str, "%s?dt=%s", MMI_AIGC_TTS_WEBSOCKET_URI, mmi_ai_device_token_get());
+
+ websocket_cfg.uri = url_str;
+#else
websocket_cfg.uri = MMI_AIGC_TTS_WEBSOCKET_URI;
+#endif
AIGC_WB_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: url=%s\n", __FUNCTION__, __LINE__, websocket_cfg.uri);
#include "sockets.h"
#include "osa.h"
+#ifdef __MMI_CUSTOM_AIGC_SUPPORT__
+
static int task_run = 0;
static OSTaskRef tts_websocket_client_ref = NULL;
static void * tts_websocket_client_stack_ptr = NULL;
client->handler = event_handler;
return 0;
}
+
+#endif
+
#include "sockets.h"
#include "osa.h"
+#ifdef __MMI_CUSTOM_AIGC_SUPPORT__
+
static int task_run = 0;
static OSTaskRef websocket_client_ref = NULL;
static void * websocket_client_stack_ptr = NULL;
client->handler = event_handler;
return 0;
}
+
+#endif
+
#include "esp_log.h"
#include "sim_esp_websocket_client.h"
+#ifdef __MMI_CUSTOM_AIGC_SUPPORT__
+
#define NO_DATA_TIMEOUT_SEC 10
char config_websocket_uri[1024] = "ws://echo.websocket.org";
sim_websocket_app_start();
return 0;
}
+
+
+#endif
+