UnrealVoxta 0.1.1
 
Loading...
Searching...
No Matches
VoxtaClient.h
Go to the documentation of this file.
1// Copyright(c) 2024 grrimgrriefer & DZnnah, see LICENSE for details.
2
3#pragma once
4#include "CoreMinimal.h"
5#include "Subsystems/GameInstanceSubsystem.h"
7#include "VoxtaDefines.h"
8#include "UserCharData.h"
9#include "VoxtaClient.generated.h"
10
11class FSignalRValue;
12class IHubConnection;
16class UVoxtaAudioPlayback;
18class VoxtaLogger;
34struct FAiCharData;
35struct FBaseCharData;
36struct FChatSession;
37struct FChatMessage;
39
48UCLASS(DisplayName = "Voxta Client", Category = "Voxta")
49class UNREALVOXTA_API UVoxtaClient : public UGameInstanceSubsystem
50{
51 GENERATED_BODY()
52
53#pragma region delegate declarations
54public:
58 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientCharacterRegistered, const FAiCharData&, charData);
60 DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FVoxtaClientCharMessageAdded, const FBaseCharData&, sender, const FChatMessage&, message);
62 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientCharMessageRemoved, const FChatMessage&, message);
64 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientSpeechTranscribed, const FString&, message);
66 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatSessionStarted, const FChatSession&, chatSession);
68 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatSessionStopped, const FChatSession&, chatSession);
70 DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FVoxtaClientAudioPlaybackRegistered, const UVoxtaAudioPlayback*, playbackHandler, const FGuid&, characterId);
72 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatContextUpdated, const FString&, newContext);
73
75 DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientStateChangedNative, VoxtaClientState);
76 DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientCharacterRegisteredNative, const FAiCharData&);
77 DECLARE_MULTICAST_DELEGATE_TwoParams(FVoxtaClientCharMessageAddedNative, const FBaseCharData&, const FChatMessage&);
78 DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientCharMessageRemovedNative, const FChatMessage&);
79 DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientSpeechTranscribedNative, const FString&);
80 DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatSessionStartedNative, const FChatSession&);
81 DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatSessionStoppedNative, const FChatSession&);
82 DECLARE_MULTICAST_DELEGATE_TwoParams(FVoxtaClientAudioPlaybackRegisteredNative, const UVoxtaAudioPlayback*, const FGuid&);
83 DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatContextUpdatedNative, const FString&);
84#pragma endregion
85
86#pragma region events
87public:
89 UPROPERTY(BlueprintAssignable, Category = "Voxta", meta = (IsBindableEvent = "True"))
90 FVoxtaClientStateChanged VoxtaClientStateChangedEvent;
92 FVoxtaClientStateChangedNative VoxtaClientStateChangedEventNative;
93
95 UPROPERTY(BlueprintAssignable, Category = "Voxta", meta = (IsBindableEvent = "True"))
96 FVoxtaClientCharacterRegistered VoxtaClientCharacterRegisteredEvent;
98 FVoxtaClientCharacterRegisteredNative VoxtaClientCharacterRegisteredEventNative;
99
105 UPROPERTY(BlueprintAssignable, Category = "Voxta", meta = (IsBindableEvent = "True"))
106 FVoxtaClientCharMessageAdded VoxtaClientCharMessageAddedEvent;
108 FVoxtaClientCharMessageAddedNative VoxtaClientCharMessageAddedEventNative;
109
111 UPROPERTY(BlueprintAssignable, Category = "Voxta", meta = (IsBindableEvent = "True"))
112 FVoxtaClientCharMessageRemoved VoxtaClientCharMessageRemovedEvent;
114 FVoxtaClientCharMessageRemovedNative VoxtaClientCharMessageRemovedEventNative;
115
117 UPROPERTY(BlueprintAssignable, Category = "Voxta", meta = (IsBindableEvent = "True"))
118 FVoxtaClientSpeechTranscribed VoxtaClientSpeechTranscribedPartialEvent;
120 FVoxtaClientSpeechTranscribedNative VoxtaClientSpeechTranscribedPartialEventNative;
121
123 UPROPERTY(BlueprintAssignable, Category = "Voxta", meta = (IsBindableEvent = "True"))
124 FVoxtaClientSpeechTranscribed VoxtaClientSpeechTranscribedCompleteEvent;
126 FVoxtaClientSpeechTranscribedNative VoxtaClientSpeechTranscribedCompleteEventNative;
127
129 UPROPERTY(BlueprintAssignable, Category = "Voxta", meta = (IsBindableEvent = "True"))
130 FVoxtaClientChatContextUpdated VoxtaClientChatContextUpdatedEvent;
132 FVoxtaClientChatContextUpdatedNative VoxtaClientChatContextUpdatedEventNative;
133
139 UPROPERTY(BlueprintAssignable, Category = "Voxta", meta = (IsBindableEvent = "True"))
140 FVoxtaClientChatSessionStarted VoxtaClientChatSessionStartedEvent;
142 FVoxtaClientChatSessionStartedNative VoxtaClientChatSessionStartedEventNative;
143
149 UPROPERTY(BlueprintAssignable, Category = "Voxta", meta = (IsBindableEvent = "True"))
150 FVoxtaClientChatSessionStopped VoxtaClientChatSessionStoppedEvent;
152 FVoxtaClientChatSessionStoppedNative VoxtaClientChatSessionStoppedEventNative;
153
155 UPROPERTY(BlueprintAssignable, Category = "Voxta", meta = (IsBindableEvent = "True"))
156 FVoxtaClientAudioPlaybackRegistered VoxtaClientAudioPlaybackRegisteredEvent;
158 FVoxtaClientAudioPlaybackRegisteredNative VoxtaClientAudioPlaybackRegisteredEventNative;
159#pragma endregion
160
161#pragma region UGameInstanceSubsystem overrides
162public:
164 virtual void Initialize(FSubsystemCollectionBase& collection) override;
166 virtual void Deinitialize() override;
167#pragma endregion
168
169#pragma region public API
170public:
178 UFUNCTION(BlueprintCallable, Category = "Voxta")
179 void StartConnection(const FString& ipv4Address, int port);
180
187 UFUNCTION(BlueprintCallable, Category = "Voxta")
188 void Disconnect(bool silent = false);
189
198 UFUNCTION(BlueprintCallable, Category = "Voxta")
199 void StartChatWithCharacter(const FGuid& charId, const FString& context = TEXT(""));
200
205 UFUNCTION(BlueprintCallable, Category = "Voxta")
206 void SetGlobalAudioFallbackEnabled(bool newState);
207
209 UFUNCTION(BlueprintPure, Category = "Voxta")
210 bool IsGlobalAudioFallbackActive() const;
211
215 UFUNCTION(BlueprintCallable, Category = "Voxta")
216 void StopActiveChat();
217
222 UFUNCTION(BlueprintCallable, Category = "Voxta")
223 void UpdateChatContext(const FString& newContext);
224
233 UFUNCTION(BlueprintCallable, Category = "Voxta")
234 void SendUserInput(const FString& inputText, bool generateReply = true, bool characterActionInference = false);
235
237 UFUNCTION(BlueprintPure, Category = "Voxta")
238 const FString& GetServerAddress() const;
239
241 UFUNCTION(BlueprintPure, Category = "Voxta")
242 int GetServerPort() const;
243
245 UFUNCTION(BlueprintPure, Category = "Voxta")
247
249 UFUNCTION(BlueprintPure, Category = "Voxta")
251
253 UFUNCTION(BlueprintPure, Category = "Voxta")
254 FGuid GetUserId() const;
255
261 UFUNCTION(BlueprintPure, Category = "Voxta")
262 FString GetBrowserUrlForCharacter(const FGuid& aiCharacterId) const;
263
265 UFUNCTION(BlueprintPure, Category = "Voxta")
266 FGuid GetMainAssistantId() const;
267
273 void TryFetchAndCacheCharacterThumbnail(const FGuid& baseCharacterId, FDownloadedTextureDelegateNative onThumbnailFetched);
274
282 UFUNCTION(BlueprintPure, Category = "Voxta")
283 const UVoxtaAudioPlayback* GetRegisteredAudioPlaybackHandlerForID(const FGuid& characterId) const;
284
292 UFUNCTION(BlueprintPure, Category = "Voxta")
293 FAiCharData GetAiCharacterDataCopyById(const FGuid& characterId) const;
294
296 UFUNCTION(BlueprintPure, Category = "Voxta")
298
308 bool TryRegisterPlaybackHandler(const FGuid& characterId, TWeakObjectPtr<UVoxtaAudioPlayback> playbackHandler);
309
317 bool TryUnregisterPlaybackHandler(const FGuid& characterId);
318
320 UFUNCTION(BlueprintPure, Category = "Voxta")
322
324 UFUNCTION(BlueprintPure, Category = "Voxta")
326
328 UFUNCTION(BlueprintPure, Category = "Voxta")
329 bool IsMatchingAPIVersion() const;
330
332 const FChatSession* GetChatSession() const;
333
335 TWeakPtr<Audio2FaceRESTHandler> GetA2FHandler() const;
336
341 UFUNCTION(BlueprintCallable, Category = "Voxta")
342 void SetCensoredLogs(bool isCensorActive);
343
345 UFUNCTION(BlueprintPure, Category = "Voxta")
346 bool IsLogCensorActive() const;
347#pragma endregion
348
349#pragma region data
350private:
351 const FString SEND_MESSAGE_EVENT_NAME = TEXT("SendMessage");
352 const FString RECEIVE_MESSAGE_EVENT_NAME = TEXT("ReceiveMessage");
353
354 UPROPERTY()
355 UVoxtaAudioInput* m_voiceInput;
356
357 UPROPERTY()
358 AVoxtaGlobalAudioPlaybackHolder* m_globalAudioPlaybackComp;
359 FDelegateHandle globalAudioPlaybackHandle;
360 bool m_enableGlobalAudioFallback = true;
361
362 TSharedPtr<VoxtaLogger> m_logUtility;
363 TSharedPtr<IHubConnection> m_hub;
364 TSharedPtr<Audio2FaceRESTHandler> m_A2FHandler;
365 TSharedPtr<TexturesCacheHandler> m_texturesCacheHandler;
366
367 VoxtaClientState m_currentState = VoxtaClientState::Disconnected;
368 TUniquePtr<FUserCharData> m_userData;
369 FGuid m_mainAssistantId;
370 FString m_hostAddress;
371 uint16 m_hostPort;
372
373 TUniquePtr<FVoxtaVersionData> m_voxtaVersionData;
374 TUniquePtr<FChatSession> m_chatSession;
375 TArray<TUniquePtr<const FAiCharData>> m_characterList;
376 TMap<FGuid, TWeakObjectPtr<UVoxtaAudioPlayback>> m_registeredCharacterAudioPlaybackComps;
377 TMap<FGuid, FDelegateHandle> m_audioPlaybackHandles;
378#pragma endregion
379
380#pragma region private API
381private:
383 void StartListeningToServer();
384
385#pragma region IHubConnection listeners
386private:
388 void OnReceivedMessage(const TArray<FSignalRValue>& arguments);
390 void OnConnected();
392 void OnConnectionError(const FString& error);
394 void OnClosed();
395#pragma endregion
396
403 void SendMessageToServer(const FSignalRValue& message);
404
414 void OnMessageSent(const FSignalRInvokeResult& deliveryReceipt);
415
427 template<typename T>
428 bool HandleResponseHelper(const ServerResponseBase* response, const FString& logMessage,
429 bool (UVoxtaClient::* handler)(const T&), bool isSensitive);
430
431#pragma region VoxtaServer response handlers
432private:
434 bool HandleResponse(const TMap<FString, FSignalRValue>& responseData);
436 bool HandleWelcomeResponse(const ServerResponseWelcome& response);
438 bool HandleCharacterListResponse(const ServerResponseCharacterList& response);
440 bool HandleChatStartedResponse(const ServerResponseChatStarted& response);
442 bool HandleChatMessageResponse(const ServerResponseChatMessageBase& response);
444 bool HandleChatUpdateResponse(const ServerResponseChatUpdate& response);
446 bool HandleSpeechTranscriptionResponse(const ServerResponseSpeechTranscription& response);
448 bool HandleErrorResponse(const ServerResponseError& response);
450 bool HandleContextUpdateResponse(const ServerResponseContextUpdated& response);
452 bool HandleChatClosedResponse(const ServerResponseChatClosed& response);
454 bool HandleChatSessionErrorResponse(const ServerResponseChatSessionError& response);
456 bool HandleConfigurationResponse(const ServerResponseConfiguration& response);
457#pragma endregion
458
459 void StopChatInternal();
460
467 void NotifyAudioPlaybackComplete(const FGuid& messageId);
468
476 void SetState(VoxtaClientState newState);
477
485 const TUniquePtr<const FAiCharData>* GetAiCharacterDataById(const FGuid& charId) const;
486
487 AVoxtaGlobalAudioPlaybackHolder* GetOrCreateGlobalAudioFallbackInternal();
488#pragma endregion
489};
VoxtaClientState
VoxtaClientState Contains the possible states that can be reported by the VoxtaClient when polled.
Definition VoxtaClientState.h:16
Definition VoxtaGlobalAudioPlaybackHolder.h:11
Audio2FaceRESTHandler Manages the HTTP REST API for A2F_headless mode.
Definition Audio2FaceRESTHandler.h:18
Represents the result of a SignalR method invocation, containing either a value or error information.
Definition IHubConnection.h:34
Represents a value that can be sent to or received from a SignalR hub.
Definition SignalRValue.h:34
Interface for a SignalR hub connection that enables real-time communication with a SignalR server.
Definition IHubConnection.h:110
TexturesCacheHandler Internal class which handles asynchronous fetching, decoding,...
Definition TexturesCacheHandler.h:19
UVoxtaAudioInput Main public-facing class responsible for containing all AudioInput related logic.
Definition VoxtaAudioInput.h:23
UVoxtaClient Main public-facing subsystem for Voxta integration.
Definition VoxtaClient.h:50
FVoxtaClientChatContextUpdated VoxtaClientChatContextUpdatedEvent
Event fired when the server has finished transcribing speech, it contains the final version of whatev...
Definition VoxtaClient.h:130
UVoxtaAudioInput * GetVoiceInputHandler() const
Definition VoxtaClient.cpp:361
FVoxtaClientCharMessageRemovedNative VoxtaClientCharMessageRemovedEventNative
Static Event variation of VoxtaClientCharMessageRemovedEvent.
Definition VoxtaClient.h:114
virtual void Initialize(FSubsystemCollectionBase &collection) override
Initialization of the instance of the system.
Definition VoxtaClient.cpp:23
void StartConnection(const FString &ipv4Address, int port)
Start the VoxtaClient and connect to the Voxta SignalR hub.
Definition VoxtaClient.cpp:56
bool IsLogCensorActive() const
Definition VoxtaClient.cpp:455
void UpdateChatContext(const FString &newContext)
Update the context of the current chat session.
Definition VoxtaClient.cpp:173
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientStateChanged, VoxtaClientState, newState)
Delegate fired when the VoxtaClient state changes.
bool TryRegisterPlaybackHandler(const FGuid &characterId, TWeakObjectPtr< UVoxtaAudioPlayback > playbackHandler)
Register the playback handler for this specific character, this is needed as we need to know if we wa...
Definition VoxtaClient.cpp:283
DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatSessionStoppedNative, const FChatSession &)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatContextUpdated, const FString &, newContext)
Delegate fired when the context of a chatsession is updated.
FVoxtaClientSpeechTranscribed VoxtaClientSpeechTranscribedCompleteEvent
Event fired when the server has finished transcribing speech, it contains the final version of whatev...
Definition VoxtaClient.h:124
void SetCensoredLogs(bool isCensorActive)
Enable or disable log censoring for sensitive logs.
Definition VoxtaClient.cpp:450
void SendUserInput(const FString &inputText, bool generateReply=true, bool characterActionInference=false)
Send user input text to the server as part of the current chat session.
Definition VoxtaClient.cpp:186
FVoxtaClientChatContextUpdatedNative VoxtaClientChatContextUpdatedEventNative
Static Event variation of VoxtaClientSpeechTranscribedCompleteEvent.
Definition VoxtaClient.h:132
FGuid GetMainAssistantId() const
Definition VoxtaClient.cpp:390
FVoxtaClientAudioPlaybackRegistered VoxtaClientAudioPlaybackRegisteredEvent
Event fired when a playbackHandler has registered itself & claimed audioplayback for that character.
Definition VoxtaClient.h:156
DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientStateChangedNative, VoxtaClientState)
Native C++ delegates for the above events.
FVoxtaClientCharacterRegisteredNative VoxtaClientCharacterRegisteredEventNative
Static Event variation of VoxtaClientCharacterRegisteredEvent.
Definition VoxtaClient.h:98
FVoxtaClientSpeechTranscribedNative VoxtaClientSpeechTranscribedCompleteEventNative
Static Event variation of VoxtaClientSpeechTranscribedCompleteEvent.
Definition VoxtaClient.h:126
FVoxtaClientCharMessageAddedNative VoxtaClientCharMessageAddedEventNative
Static Event variation of VoxtaClientCharMessageAddedEvent.
Definition VoxtaClient.h:108
FVoxtaClientChatSessionStarted VoxtaClientChatSessionStartedEvent
Event fired when the chat session has begun.
Definition VoxtaClient.h:140
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FVoxtaClientCharMessageAdded, const FBaseCharData &, sender, const FChatMessage &, message)
Delegate fired when a chat message is added.
int GetServerPort() const
Definition VoxtaClient.cpp:356
FVoxtaClientStateChangedNative VoxtaClientStateChangedEventNative
Static Event variation of VoxtaClientStateChangedEvent.
Definition VoxtaClient.h:92
FVoxtaClientChatSessionStoppedNative VoxtaClientChatSessionStoppedEventNative
Static Event variation of VoxtaClientChatSessionStoppedEvent.
Definition VoxtaClient.h:152
void StartChatWithCharacter(const FGuid &charId, const FString &context=TEXT(""))
Tell the server to initiate a chat session with the character of the provided ID.
Definition VoxtaClient.cpp:121
bool IsGlobalAudioFallbackActive() const
Definition VoxtaClient.cpp:460
const UVoxtaAudioPlayback * GetRegisteredAudioPlaybackHandlerForID(const FGuid &characterId) const
Try to retrieve a pointer to the UVoxtaAudioPlayback that has claimed playback for the provided chara...
Definition VoxtaClient.cpp:395
FVoxtaClientSpeechTranscribed VoxtaClientSpeechTranscribedPartialEvent
Event fired when the server is in progress of transcribing speech, it contains the current version of...
Definition VoxtaClient.h:118
FVoxtaClientChatSessionStopped VoxtaClientChatSessionStoppedEvent
Event fired when the chat session has ended.
Definition VoxtaClient.h:150
TWeakPtr< Audio2FaceRESTHandler > GetA2FHandler() const
Definition VoxtaClient.cpp:445
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientSpeechTranscribed, const FString &, message)
Delegate fired when speech is transcribed.
void SetGlobalAudioFallbackEnabled(bool newState)
Enable or disable the global audio fallback handler (for characters without a specific handler).
Definition VoxtaClient.cpp:149
FVoxtaClientCharMessageAdded VoxtaClientCharMessageAddedEvent
Event fired when the VoxtaClient is notified by the server that a message is added.
Definition VoxtaClient.h:106
TArray< FAiCharData > GetAvailableAiCharactersCopy() const
Definition VoxtaClient.cpp:493
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatSessionStarted, const FChatSession &, chatSession)
Delegate fired when a chat session starts.
FVoxtaClientCharacterRegistered VoxtaClientCharacterRegisteredEvent
Event fired when the internal VoxtaClient has loaded the metadata of an AiCharData.
Definition VoxtaClient.h:96
DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientCharMessageRemovedNative, const FChatMessage &)
void TryFetchAndCacheCharacterThumbnail(const FGuid &baseCharacterId, FDownloadedTextureDelegateNative onThumbnailFetched)
Asynchronously fetch and cache the thumbnail for a character.
Definition VoxtaClient.cpp:234
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientCharacterRegistered, const FAiCharData &, charData)
Delegate fired when a character is registered.
DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatSessionStartedNative, const FChatSession &)
FVoxtaVersionData GetServerVersionCopy() const
Definition VoxtaClient.cpp:418
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatSessionStopped, const FChatSession &, chatSession)
Delegate fired when a chat session stops.
const FString & GetServerAddress() const
Definition VoxtaClient.cpp:351
FAiCharData GetAiCharacterDataCopyById(const FGuid &characterId) const
Try to retrieve a copy of the characterData for the provided characterId.
Definition VoxtaClient.cpp:478
FChatSession GetChatSessionCopy() const
Definition VoxtaClient.cpp:408
DECLARE_MULTICAST_DELEGATE_TwoParams(FVoxtaClientCharMessageAddedNative, const FBaseCharData &, const FChatMessage &)
void Disconnect(bool silent=false)
Disconnect from the VoxtaServer and clean up all resources.
Definition VoxtaClient.cpp:94
FVoxtaClientSpeechTranscribedNative VoxtaClientSpeechTranscribedPartialEventNative
Static Event variation of VoxtaClientSpeechTranscribedPartialEvent.
Definition VoxtaClient.h:120
DECLARE_MULTICAST_DELEGATE_TwoParams(FVoxtaClientAudioPlaybackRegisteredNative, const UVoxtaAudioPlayback *, const FGuid &)
FString GetBrowserUrlForCharacter(const FGuid &aiCharacterId) const
Get the browser URL for a given AI character.
Definition VoxtaClient.cpp:380
FVoxtaClientStateChanged VoxtaClientStateChangedEvent
Event fired when the internal VoxtaClient has finished transitioning to a different state.
Definition VoxtaClient.h:90
bool IsMatchingAPIVersion() const
Definition VoxtaClient.cpp:427
DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientCharacterRegisteredNative, const FAiCharData &)
FGuid GetUserId() const
Definition VoxtaClient.cpp:371
VoxtaClientState GetCurrentState() const
Definition VoxtaClient.cpp:366
FVoxtaClientChatSessionStartedNative VoxtaClientChatSessionStartedEventNative
Static Event variation of VoxtaClientChatSessionStartedEvent.
Definition VoxtaClient.h:142
void StopActiveChat()
Tell the server to stop the ongoing chat session and clean up the relevant dependencies.
Definition VoxtaClient.cpp:168
DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientSpeechTranscribedNative, const FString &)
FVoxtaClientAudioPlaybackRegisteredNative VoxtaClientAudioPlaybackRegisteredEventNative
Static Event variation of VoxtaClientAudioPlaybackRegisteredEvent.
Definition VoxtaClient.h:158
DECLARE_MULTICAST_DELEGATE_OneParam(FVoxtaClientChatContextUpdatedNative, const FString &)
FVoxtaClientCharMessageRemoved VoxtaClientCharMessageRemovedEvent
Event fired when the server has notified the client that a message has been removed.
Definition VoxtaClient.h:112
bool TryUnregisterPlaybackHandler(const FGuid &characterId)
Unregister the audio playback handler for a character.
Definition VoxtaClient.cpp:328
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FVoxtaClientCharMessageRemoved, const FChatMessage &, message)
Delegate fired when a chat message is removed.
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FVoxtaClientAudioPlaybackRegistered, const UVoxtaAudioPlayback *, playbackHandler, const FGuid &, characterId)
Delegate fired when an audio playback handler is registered.
const FChatSession * GetChatSession() const
Definition VoxtaClient.cpp:436
virtual void Deinitialize() override
Deinitialization of the instance of the system.
Definition VoxtaClient.cpp:35
VoxtaApiRequestHandler Internal helper class to serialize request data which then can be sent to Voxt...
Definition VoxtaApiRequestHandler.h:17
VoxtaApiResponseHandler Stateless utility class for deserializing and mapping raw SignalR responses f...
Definition VoxtaApiResponseHandler.h:33
VoxtaLogger Internal class that enables the automatic printing of warnings and errors in the VoxtaLog...
Definition VoxtaLogger.h:15
FAiCharData Read-only data struct containing all the relevant information for an AI character.
Definition AiCharData.h:21
FBaseCharData Read-only data struct containing all the universal information fields for a character.
Definition BaseCharData.h:17
FChatMessage Represents a single message in a chat conversation, containing both text and audio data.
Definition ChatMessage.h:16
FChatSession Data struct containing all the relevant information regarding a chat session between the...
Definition ChatSession.h:20
FUserCharData Read-only data struct containing all the relevant information for the character represe...
Definition UserCharData.h:20
FVoxtaVersionData Data struct for managing version compatibility between the UnrealVoxta client and V...
Definition VoxtaVersionData.h:17
ServerResponseBase Abstract read-only data struct that all responses from the VoxtaServer derive from...
Definition ServerResponseBase.h:15
ServerResponseCharacterList Read-only data struct containing the relevant data of the 'charactersList...
Definition ServerResponseCharacterList.h:15
ServerResponseChatClosed Read-only data struct containing the relevant data of the 'chatClosed' respo...
Definition ServerResponseChatClosed.h:14
ServerResponseChatMessageBase Abstract read-only data struct containing the shared relevant data for ...
Definition ServerResponseChatMessageBase.h:15
ServerResponseChatSessionError Read-only data struct containing the relevant data of the 'chatSession...
Definition ServerResponseChatSessionError.h:14
ServerResponseChatStarted Read-only data struct containing the relevant data of the 'chatStarted' res...
Definition ServerResponseChatStarted.h:15
ServerResponseChatUpdate Read-only data struct containing the relevant data of the 'update' response ...
Definition ServerResponseChatUpdate.h:14
ServerResponseConfiguration Read-only data struct containing the relevant data of the 'configuration'...
Definition ServerResponseConfiguration.h:15
ServerResponseContextUpdated Read-only data struct containing the relevant data of the 'ContextUpdate...
Definition ServerResponseContextUpdated.h:14
ServerResponseError Read-only data struct containing the relevant data of the 'error' response from t...
Definition ServerResponseError.h:14
ServerResponseSpeechTranscription Read-only data struct containing the relevant data of the 'SpeechTr...
Definition ServerResponseSpeechTranscription.h:14
ServerResponseWelcome Read-only data struct containing the relevant data of the 'welcome' response fr...
Definition ServerResponseWelcome.h:15