diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..6b61141 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,6 @@ +{ + "ExpandedNodes": [ + "" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..a70d925 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/Unreal/Content/Movies/Clouds.mp4 b/Unreal/Content/Movies/Clouds.mp4 index 28329a0..599949d 100644 --- a/Unreal/Content/Movies/Clouds.mp4 +++ b/Unreal/Content/Movies/Clouds.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f02f444fe5d587466424f6f758a63a564f4e78b028223ef005f940b794ea32b5 -size 281319924 +oid sha256:31783891a9d22dc0eaf446a8bf3a8142ee2f84b141fc8586e53c1accb2db54b2 +size 157622613 diff --git a/Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Private/RealtimeAPI/AvatarCoreAIRealtime.cpp b/Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Private/RealtimeAPI/AvatarCoreAIRealtime.cpp index b276989..4349741 100644 --- a/Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Private/RealtimeAPI/AvatarCoreAIRealtime.cpp +++ b/Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Private/RealtimeAPI/AvatarCoreAIRealtime.cpp @@ -686,6 +686,15 @@ void UAvatarCoreAIRealtime::WebSocketSendAudioChunk(FString Base64AudioChunk) } } +void UAvatarCoreAIRealtime::DebugDisconnect(int32 DisconnectCode) +{ + if (Socket == nullptr) { + BroadcastAIError("Trying to send something over WebSocket but Websocket is not initialized.", EAvatarCoreAIError::NotInitialized); + return; + } + Socket->Close(DisconnectCode); +} + FString UAvatarCoreAIRealtime::GetRoleAsString(EOpenAIRoleType role) { diff --git a/Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Public/RealtimeAPI/AvatarCoreAIRealtime.h b/Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Public/RealtimeAPI/AvatarCoreAIRealtime.h index cbc4df2..be814f5 100644 --- a/Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Public/RealtimeAPI/AvatarCoreAIRealtime.h +++ b/Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Public/RealtimeAPI/AvatarCoreAIRealtime.h @@ -191,6 +191,10 @@ public: void OnSTTAudioChunk(TArray AudioChunks); void WebSocketSendAudioChunk(FString Base64AudioChunk); + //Simulate a disconnect with a disconnect code, to simulate server side socket closing + UFUNCTION(BlueprintCallable, Category = "AvatarCore AI|RealtimeAPI") + void DebugDisconnect(int32 DisconnectCode); + private: URealtimeAPIConfig* RealtimeConfig; diff --git a/Unreal/Plugins/AvatarCore_Manager/Content/Widgets/Debug/Pages/W_DebugAvatarCoreAI.uasset b/Unreal/Plugins/AvatarCore_Manager/Content/Widgets/Debug/Pages/W_DebugAvatarCoreAI.uasset index e8f50a6..31218da 100644 --- a/Unreal/Plugins/AvatarCore_Manager/Content/Widgets/Debug/Pages/W_DebugAvatarCoreAI.uasset +++ b/Unreal/Plugins/AvatarCore_Manager/Content/Widgets/Debug/Pages/W_DebugAvatarCoreAI.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b5d7ed7cde4efecb4c39245638a0f971b4c8457dfa576f2b7f8e8a6071177ef5 -size 154135 +oid sha256:a4ff71955050f79437d19dbc0e849bd9bc0d43f134888b43b1db5971c02fd64e +size 173618