MetaSoul

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
UESSubSystem Class Reference

`#include <ESSubSystem.h>`

Inheritance diagram for UESSubSystem:

## Public Member Functions
virtual void | Initialize (FSubsystemCollectionBase &Collection) override
bool | StartUDPReceiver (const FString &YourChosenSocketName, const FString &TheIP, const int32 ThePort)
void | CloseReceiver ()
void | Recv (const FArrayReaderPtr &ArrayReaderPtr, const FIPv4Endpoint &EndPt)
void | Login ()
| ----— NEW API -----—
void | Logout ()
void | CustomWave (FString type, int32 apex, int32 curve, int32 level, int32 duration, int32 origin)
void | AudioData (FString text, FString voice_name="en-US-JennyNeural", bool generateEmo=false, FString chat_history="", int32 coef=30)
void | StartUDP ()
| ----— / NEW API -----—
void | Connect (const FString &ipAddress)
void | ConnectAlternative (const FString &ipAddress)
void | CheckConnection ()
void | StartEPU (FString method, FString key)
void | StartEPUProcess (FString path, bool silent)
void | StopEPUProcess ()
void | PauseEPU ()
void | CloseEPU ()
void | SendCustomMessage (FString Msg, bool end)
void | LongLineSend (FString &Msg)
void | ResumeEPU ()
void | ResetEPU ()
void | SendMessage (FString message)
void | SendBroadcast (FString message)
void | SendTextToSpeech (FString message)
void | SetSenses (bool robot, FString value)
void | SetPersistence (bool robot, FString value)
void | SetObjectiveAppraisal (bool robot)
void | SetSimbolicLearning (FString message)
void | SaveSimbolicLearning (FString word)
void | EraseLexic ()
void | InjectEmotion (FString emotion, FString level, FString duration, FString origin_id, FString apex, FString curve)
void | AskForEmotionalBuffer ()
void | BroadcastMessageToAllClients (FString message)
void | EnableDisableToneOfVoiceDetection (bool on)
void | EnableDisableFaceTracking (bool on)
void | AddRemoveUserForFaceTracking (FString username, bool add)
void | SetSpeechRecognition (bool on)
void | GetCurrentFaceTrackingUser ()
void | StartSharedMem ()
void | StopSharedMem ()
void | GetSupportedLanguages ()
void | SetLanguages (FString index)
void | StopConnection ()
FString | UTF8toString (const TArray< uint8 > &BinaryArray)
void | UpdateEmotionTMap (TArray< FString > mArray)
void | ReadMDADSharedMemory ()
void | ReadGPTSharedMemory ()
void | ReadVisemeSharedMemory ()
void | ReceiveMessage ()
void | SendPut (FString PathSuffix, UESJsonObject *Json, PossibleResponses functionName)
void | SendPost (FString PathSuffix, UESJsonObject *Json, PossibleResponses functionName)
void | SendGet (FString PathSuffix, PossibleResponses functionName)
void | PostSER (FString Pathsuffix, FSecretParam Secret_Param, TArray< uint8 > audio)
auto | GetResponse (FString name) -> void(UESSubSystem::*)(TSharedPtr< IHttpRequest, ESPMode::ThreadSafe >, TSharedPtr< IHttpResponse, ESPMode::ThreadSafe >, bool)
void | PostResponse (FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
void | PostResponseAudioData (FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
void | PostResponseBuffer (FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
void | PostResponseText (FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
void | PostResponseLogin (FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
void | PostResponseLoginWeb (FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
void | PostResponseLogout (FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
void | PostResponseSER (FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
void | PostResponseHeartBeat (FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
void | ConvertSERToEmotions (TArray< int > SEREmotionalValues)
void | HandleSERResponse (FString text)
void | StereoToMono (TArray< uint8 > stereoWavBytes, TArray< uint8 > &monoWavBytes)

## Static Public Member Functions
static TArray< FViseme > | parseVisems (const TArray< FViseme > &visems)

## Public Attributes
ESIOClient * | IOClient
int32 | Port = 2424
int32 | BufferSize = 256
FSocket * | Socket = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateSocket(NAME_Stream, TEXT("default"), false)
FSocket * | ListenSocket
FString | CustomLineBreaker = " 5c72"
FUdpSocketReceiver * | UDPReceiver = nullptr
FString | UdpText = ""
FString | RemoveIP = ""
FString | Message
FString | MetaSoulSecret
| ----— NEW API -----—
FString | Epu_ID = ""
FString | AzureKey = ""
FString | AzureKeyRegion = "westeurope"
FString | OpenAIKey = ""
FString | Token
FString | ChatHistory = ""
bool | bTalkmode = false
| ----— / NEW API -----—
bool | bConnected = false
int32 | BytesSent = 0
TArray< uint8 > | ReceivedData
TMap< FString, FString > | MEmotions
FString | GptData
TArray< int > | VisemeOffset
TArray< int > | VisemeID
bool | SharedMem = false
void * | SharedMemoryHandle
| Mapped memory handle.
unsigned char * | SharedMemoryData
| Pointer to memory data.
size_t | SharedMemorySize
| Length of the memory (memory size).
void * | SharedMemoryMutex
FMetaSoulEventSignature | onLogin
FMetaSoulEventSignature | onLogout
FMetaSoulEventSignature | onConnectionFail
FMetaSoulEventSignatureAudio | onAudioData
FString | HeartBeatParam
TMap< FString, void(UESSubSystem::*)(TSharedPtr< IHttpRequest, ESPMode::ThreadSafe >, TSharedPtr< IHttpResponse, ESPMode::ThreadSafe >, bool)> | PseudoReflectionMap

## Member Function Documentation

## ◆ AddRemoveUserForFaceTracking()

void UESSubSystem::AddRemoveUserForFaceTracking | ( | FString | username,
|  | bool | add )

## ◆ AskForEmotionalBuffer()

void UESSubSystem::AskForEmotionalBuffer | ( |  | ) |

## ◆ AudioData()

void UESSubSystem::AudioData | ( | FString | text,
|  | FString | voice_name = "en-US-JennyNeural",
|  | bool | generateEmo = false,
|  | FString | chat_history = "",
|  | int32 | coef = 30 )

## ◆ BroadcastMessageToAllClients()

void UESSubSystem::BroadcastMessageToAllClients | ( | FString | message | ) |

## ◆ CheckConnection()

void UESSubSystem::CheckConnection | ( |  | ) |

## ◆ CloseEPU()

void UESSubSystem::CloseEPU | ( |  | ) |

## ◆ CloseReceiver()

void UESSubSystem::CloseReceiver | ( |  | ) |

## ◆ Connect()

void UESSubSystem::Connect | ( | const FString & | ipAddress | ) |

## ◆ ConnectAlternative()

void UESSubSystem::ConnectAlternative | ( | const FString & | ipAddress | ) |

## ◆ ConvertSERToEmotions()

void UESSubSystem::ConvertSERToEmotions | ( | TArray< int > | SEREmotionalValues | ) |

## ◆ CustomWave()

void UESSubSystem::CustomWave | ( | FString | type,
|  | int32 | apex,
|  | int32 | curve,
|  | int32 | level,
|  | int32 | duration,
|  | int32 | origin )

## ◆ EnableDisableFaceTracking()

void UESSubSystem::EnableDisableFaceTracking | ( | bool | on | ) |

## ◆ EnableDisableToneOfVoiceDetection()

void UESSubSystem::EnableDisableToneOfVoiceDetection | ( | bool | on | ) |

## ◆ EraseLexic()

void UESSubSystem::EraseLexic | ( |  | ) |

## ◆ GetCurrentFaceTrackingUser()

void UESSubSystem::GetCurrentFaceTrackingUser | ( |  | ) |

## ◆ GetResponse()

auto UESSubSystem::GetResponse | ( | FString | name | ) | -> void(UESSubSystem::*)(TSharedPtr<IHttpRequest, ESPMode::ThreadSafe>, TSharedPtr<IHttpResponse, ESPMode::ThreadSafe>, bool)

## ◆ GetSupportedLanguages()

void UESSubSystem::GetSupportedLanguages | ( |  | ) |

## ◆ HandleSERResponse()

void UESSubSystem::HandleSERResponse | ( | FString | text | ) |

## ◆ Initialize()

void UESSubSystem::Initialize | ( | FSubsystemCollectionBase & | Collection | ) |
| override virtual

## ◆ InjectEmotion()

void UESSubSystem::InjectEmotion | ( | FString | emotion,
|  | FString | level,
|  | FString | duration,
|  | FString | origin_id,
|  | FString | apex,
|  | FString | curve )

## ◆ Login()

void UESSubSystem::Login | ( |  | ) |

----— NEW API -----—

## ◆ Logout()

void UESSubSystem::Logout | ( |  | ) |

## ◆ LongLineSend()

void UESSubSystem::LongLineSend | ( | FString & | Msg | ) |

## ◆ parseVisems()

TArray< FViseme > UESSubSystem::parseVisems | ( | const TArray< FViseme > & | visems | ) |
| static

## ◆ PauseEPU()

void UESSubSystem::PauseEPU | ( |  | ) |

## ◆ PostResponse()

void UESSubSystem::PostResponse | ( | FHttpRequestPtr | Request,
|  | FHttpResponsePtr | Response,
|  | bool | bWasSuccessful )

## ◆ PostResponseAudioData()

void UESSubSystem::PostResponseAudioData | ( | FHttpRequestPtr | Request,
|  | FHttpResponsePtr | Response,
|  | bool | bWasSuccessful )

## ◆ PostResponseBuffer()

void UESSubSystem::PostResponseBuffer | ( | FHttpRequestPtr | Request,
|  | FHttpResponsePtr | Response,
|  | bool | bWasSuccessful )

## ◆ PostResponseHeartBeat()

void UESSubSystem::PostResponseHeartBeat | ( | FHttpRequestPtr | Request,
|  | FHttpResponsePtr | Response,
|  | bool | bWasSuccessful )

## ◆ PostResponseLogin()

void UESSubSystem::PostResponseLogin | ( | FHttpRequestPtr | Request,
|  | FHttpResponsePtr | Response,
|  | bool | bWasSuccessful )

## ◆ PostResponseLoginWeb()

void UESSubSystem::PostResponseLoginWeb | ( | FHttpRequestPtr | Request,
|  | FHttpResponsePtr | Response,
|  | bool | bWasSuccessful )

## ◆ PostResponseLogout()

void UESSubSystem::PostResponseLogout | ( | FHttpRequestPtr | Request,
|  | FHttpResponsePtr | Response,
|  | bool | bWasSuccessful )

## ◆ PostResponseSER()

void UESSubSystem::PostResponseSER | ( | FHttpRequestPtr | Request,
|  | FHttpResponsePtr | Response,
|  | bool | bWasSuccessful )

## ◆ PostResponseText()

void UESSubSystem::PostResponseText | ( | FHttpRequestPtr | Request,
|  | FHttpResponsePtr | Response,
|  | bool | bWasSuccessful )

## ◆ PostSER()

void UESSubSystem::PostSER | ( | FString | Pathsuffix,
|  | FSecretParam | Secret_Param,
|  | TArray< uint8 > | audio )

## ◆ ReadGPTSharedMemory()

void UESSubSystem::ReadGPTSharedMemory | ( |  | ) |

## ◆ ReadMDADSharedMemory()

void UESSubSystem::ReadMDADSharedMemory | ( |  | ) |

## ◆ ReadVisemeSharedMemory()

void UESSubSystem::ReadVisemeSharedMemory | ( |  | ) |

## ◆ ReceiveMessage()

void UESSubSystem::ReceiveMessage | ( |  | ) |

This is the recieveMessage you call this whetever you want to receive something from the EPU SDK Buffer, just take in note this use a nonblocking setting, so if you put a .Send() and a .Recv() one after the other it will not compute the correct values.
Nowadays this is mostly used to receive IO messages and special systems if needed, but you can also get the emotional states but the Shared Memory method is recommended nowadays.

## ◆ Recv()

void UESSubSystem::Recv | ( | const FArrayReaderPtr & | ArrayReaderPtr,
|  | const FIPv4Endpoint & | EndPt )

## ◆ ResetEPU()

void UESSubSystem::ResetEPU | ( |  | ) |

## ◆ ResumeEPU()

void UESSubSystem::ResumeEPU | ( |  | ) |

## ◆ SaveSimbolicLearning()

void UESSubSystem::SaveSimbolicLearning | ( | FString | word | ) |

## ◆ SendBroadcast()

void UESSubSystem::SendBroadcast | ( | FString | message | ) |

## ◆ SendCustomMessage()

void UESSubSystem::SendCustomMessage | ( | FString | Msg,
|  | bool | end )

## ◆ SendGet()

void UESSubSystem::SendGet | ( | FString | PathSuffix,
|  | PossibleResponses | functionName )

## ◆ SendMessage()

void UESSubSystem::SendMessage | ( | FString | message | ) |

## ◆ SendPost()

void UESSubSystem::SendPost | ( | FString | PathSuffix,
|  | UESJsonObject * | Json,
|  | PossibleResponses | functionName )

## ◆ SendPut()

void UESSubSystem::SendPut | ( | FString | PathSuffix,
|  | UESJsonObject * | Json,
|  | PossibleResponses | functionName )

## ◆ SendTextToSpeech()

void UESSubSystem::SendTextToSpeech | ( | FString | message | ) |

## ◆ SetLanguages()

void UESSubSystem::SetLanguages | ( | FString | index | ) |

## ◆ SetObjectiveAppraisal()

void UESSubSystem::SetObjectiveAppraisal | ( | bool | robot | ) |

## ◆ SetPersistence()

void UESSubSystem::SetPersistence | ( | bool | robot,
|  | FString | value )

## ◆ SetSenses()

void UESSubSystem::SetSenses | ( | bool | robot,
|  | FString | value )

## ◆ SetSimbolicLearning()

void UESSubSystem::SetSimbolicLearning | ( | FString | message | ) |

## ◆ SetSpeechRecognition()

void UESSubSystem::SetSpeechRecognition | ( | bool | on | ) |

## ◆ StartEPU()

void UESSubSystem::StartEPU | ( | FString | method,
|  | FString | key )

## ◆ StartEPUProcess()

void UESSubSystem::StartEPUProcess | ( | FString | path,
|  | bool | silent )

## ◆ StartSharedMem()

void UESSubSystem::StartSharedMem | ( |  | ) |

## ◆ StartUDP()

void UESSubSystem::StartUDP | ( |  | ) |

----— / NEW API -----—

## ◆ StartUDPReceiver()

bool UESSubSystem::StartUDPReceiver | ( | const FString & | YourChosenSocketName,
|  | const FString & | TheIP,
|  | const int32 | ThePort )

## ◆ StereoToMono()

void UESSubSystem::StereoToMono | ( | TArray< uint8 > | stereoWavBytes,
|  | TArray< uint8 > & | monoWavBytes )

## ◆ StopConnection()

void UESSubSystem::StopConnection | ( |  | ) |

## ◆ StopEPUProcess()

void UESSubSystem::StopEPUProcess | ( |  | ) |

## ◆ StopSharedMem()

void UESSubSystem::StopSharedMem | ( |  | ) |

## ◆ UpdateEmotionTMap()

void UESSubSystem::UpdateEmotionTMap | ( | TArray< FString > | mArray | ) |

## ◆ UTF8toString()

FString UESSubSystem::UTF8toString | ( | const TArray< uint8 > & | BinaryArray | ) |

## Member Data Documentation

## ◆ AzureKey

FString UESSubSystem::AzureKey = ""

## ◆ AzureKeyRegion

FString UESSubSystem::AzureKeyRegion = "westeurope"

## ◆ bConnected

bool UESSubSystem::bConnected = false

## ◆ bTalkmode

bool UESSubSystem::bTalkmode = false

----— / NEW API -----—

## ◆ BufferSize

int32 UESSubSystem::BufferSize = 256

## ◆ BytesSent

int32 UESSubSystem::BytesSent = 0

## ◆ ChatHistory

FString UESSubSystem::ChatHistory = ""

## ◆ CustomLineBreaker

FString UESSubSystem::CustomLineBreaker = " 5c72"

## ◆ Epu_ID

FString UESSubSystem::Epu_ID = ""

## ◆ GptData

FString UESSubSystem::GptData

## ◆ HeartBeatParam

FString UESSubSystem::HeartBeatParam

## ◆ IOClient

ESIOClient* UESSubSystem::IOClient

## ◆ ListenSocket

FSocket* UESSubSystem::ListenSocket

## ◆ MEmotions

TMap<FString, FString> UESSubSystem::MEmotions

## ◆ Message

FString UESSubSystem::Message

-----— EPU SDK SECTION ----—///

## ◆ MetaSoulSecret

FString UESSubSystem::MetaSoulSecret

----— NEW API -----—

## ◆ onAudioData

FMetaSoulEventSignatureAudio UESSubSystem::onAudioData

## ◆ onConnectionFail

FMetaSoulEventSignature UESSubSystem::onConnectionFail

## ◆ onLogin

FMetaSoulEventSignature UESSubSystem::onLogin

## ◆ onLogout

FMetaSoulEventSignature UESSubSystem::onLogout

## ◆ OpenAIKey

FString UESSubSystem::OpenAIKey = ""

## ◆ Port

int32 UESSubSystem::Port = 2424

-----— SOCKET SECTION ----—///

## ◆ PseudoReflectionMap

TMap<FString, void(UESSubSystem::*)(TSharedPtr<IHttpRequest, ESPMode::ThreadSafe>, TSharedPtr<IHttpResponse, ESPMode::ThreadSafe>, bool)> UESSubSystem::PseudoReflectionMap

## ◆ ReceivedData

TArray<uint8> UESSubSystem::ReceivedData

## ◆ RemoveIP

FString UESSubSystem::RemoveIP = ""

## ◆ SharedMem

bool UESSubSystem::SharedMem = false

## ◆ SharedMemoryData

unsigned char* UESSubSystem::SharedMemoryData

Pointer to memory data.

## ◆ SharedMemoryHandle

void* UESSubSystem::SharedMemoryHandle

Mapped memory handle.

## ◆ SharedMemoryMutex

void* UESSubSystem::SharedMemoryMutex

## ◆ SharedMemorySize

size_t UESSubSystem::SharedMemorySize

Length of the memory (memory size).

## ◆ Socket

FSocket* UESSubSystem::Socket = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateSocket(NAME_Stream, TEXT("default"), false)

## ◆ Token

FString UESSubSystem::Token

## ◆ UDPReceiver

FUdpSocketReceiver* UESSubSystem::UDPReceiver = nullptr

## ◆ UdpText

FString UESSubSystem::UdpText = ""

## ◆ VisemeID

TArray<int> UESSubSystem::VisemeID

## ◆ VisemeOffset

TArray<int> UESSubSystem::VisemeOffset

The documentation for this class was generated from the following files:

- Public/ESSubSystem.h
- Private/ESSubSystem.cpp