Skip to content

Class UTryllLipSyncComponent

ClassList > UTryllLipSyncComponent

More...

  • #include <TryllLipSyncComponent.h>

Inherits the following classes: UActorComponent

Public Attributes

Type Name
TObjectPtr< USkeletalMeshComponent > FaceMesh
TArray< FTryllVisemePose > Poses
FTryllVisemeSettings Settings
TObjectPtr< UTryllSpeakerComponent > Speaker

Public Functions

Type Name
void BindFace (USkeletalMeshComponent * InFaceMesh)
ETryllViseme GetActiveViseme () const
float GetAppliedJawOpen () const
int32 GetBoundChannelCount () const
const FTryllVisemePlayer & GetPlayer () const
bool IsFaceBound () const
void SetIntensity (float InIntensity)
UTryllLipSyncComponent ()

Protected Functions

Type Name
virtual void BeginPlay () override
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason) override
virtual void TickComponent (float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction) override

Detailed Description

Moves a character's mouth with its voice. Plays the server's viseme track (the agent's voice profile needs Emit Visemes on) on a face with ARKit morph targets, in step with the audio the Tryll Speaker is playing.

Only the morph targets its pose table names are written; everything else on the mesh (blinks, brows, expressions) is left to the character's animation. Written morph targets override the AnimBP's value for that name while non-zero, and return to it at rest.

Requires a UTryllSpeakerComponent: it is the audio, the playback clock and the source of the viseme track.

Public Attributes Documentation

variable FaceMesh

TObjectPtr<USkeletalMeshComponent> UTryllLipSyncComponent::FaceMesh;

Mesh carrying the ARKit morph targets. If unset, the owner's skeletal meshes are searched for one that has them.


variable Poses

TArray<FTryllVisemePose> UTryllLipSyncComponent::Poses;

Pose per viseme, as ARKit channel weights. Empty uses the built-in table. Read at BeginPlay.


variable Settings

FTryllVisemeSettings UTryllLipSyncComponent::Settings;

Look and sync. Live-editable in Play.


variable Speaker

TObjectPtr<UTryllSpeakerComponent> UTryllLipSyncComponent::Speaker;

Speaker whose TTS drives the face. Auto-discovered on the owner if unset.


Public Functions Documentation

function BindFace

void UTryllLipSyncComponent::BindFace (
    USkeletalMeshComponent * InFaceMesh
) 

Rebinds to a face mesh (e.g. after spawning or swapping it at runtime).


function GetActiveViseme

inline ETryllViseme UTryllLipSyncComponent::GetActiveViseme () const

function GetAppliedJawOpen

inline float UTryllLipSyncComponent::GetAppliedJawOpen () const

jawOpen as written this frame (0..1).


function GetBoundChannelCount

inline int32 UTryllLipSyncComponent::GetBoundChannelCount () const

Number of pose-table channels found as morph targets on the face.


function GetPlayer

inline const FTryllVisemePlayer & UTryllLipSyncComponent::GetPlayer () const

The player, for integrations that apply the curves themselves (e.g. a MetaHuman face).


function IsFaceBound

inline bool UTryllLipSyncComponent::IsFaceBound () const

True once at least one morph target in the pose table was found on the face.


function SetIntensity

inline void UTryllLipSyncComponent::SetIntensity (
    float InIntensity
) 

Convenience for the most-used knob.


function UTryllLipSyncComponent

UTryllLipSyncComponent::UTryllLipSyncComponent () 

Protected Functions Documentation

function BeginPlay

virtual void UTryllLipSyncComponent::BeginPlay () override

function EndPlay

virtual void UTryllLipSyncComponent::EndPlay (
    const EEndPlayReason::Type EndPlayReason
) override

function TickComponent

virtual void UTryllLipSyncComponent::TickComponent (
    float DeltaTime,
    ELevelTick TickType,
    FActorComponentTickFunction * ThisTickFunction
) override


The documentation for this class was generated from the following file C:/_tryll/_monorepo3/tryll/clients/unreal/Source/TryllClient/Public/TryllLipSyncComponent.h