Class FTryllVisemePlayer¶
ClassList > FTryllVisemePlayer
#include <TryllVisemePlayer.h>
Classes¶
| Type | Name |
|---|---|
| struct | FSettings |
Public Attributes¶
| Type | Name |
|---|---|
| FSettings | Settings |
Public Functions¶
| Type | Name |
|---|---|
| void | AddEvents (TArrayView< const FTryllVisemeEvent > Events) |
| void | ApplySettings (const FTryllVisemeSettings & In) |
| void | BeginTurn (int32 SampleRate, int64 TurnOriginSamples) |
| FTryllVisemePlayer () |
|
| ETryllViseme | GetActiveViseme () const |
| const TArray< FName > & | GetChannels () const |
| float | GetCurve (FName Channel) const |
| TConstArrayView< float > | GetCurves () const |
| float | GetSmoothingLagMs () const |
| void | Reset () |
| void | SetPoses (TConstArrayView< FTryllVisemePose > Poses) |
| void | Tick (int64 PlayedSamples, float DeltaSeconds) |
Public Static Functions¶
| Type | Name |
|---|---|
| TArray< FTryllVisemePose > | DefaultPoses () |
Detailed Description¶
Plays a TTS viseme track as ARKit curve values, in step with audio playback.
Engine-object free so any consumer can drive it: UTryllLipSyncComponent writes the curves to morph targets, and a MetaHuman integration can push the same curves through Epic's ARKit mapping.
Per turn: BeginTurn (from UTryllSpeakerComponent::OnTtsTurnStarted), then AddEvents for each viseme frame (OnTtsVisemes). Every frame: Tick with the playback clock's played samples, then read GetCurves().
What it does, as in the Unity client's TryllLipSync: * the active viseme's pose, scaled by the event weight (loudness); * a smoothstep cross-fade over AttackDecayMs into each new viseme; * Intensity scales everything; * exponential smoothing at SmoothingPerSecond, ClosureSmoothingPerSecond while p/b/m or f/v is showing (a ~70 ms closure never lands at the slow rate); * the track is read ahead by the delay that smoothing adds, so tuning it does not move sync; * rest once the last shape of a turn has been held MaxHoldMs.
Public Attributes Documentation¶
variable Settings¶
Public Functions Documentation¶
function AddEvents¶
function ApplySettings¶
Copies the editable settings (a component's Details panel) into Settings.
function BeginTurn¶
function FTryllVisemePlayer¶
function GetActiveViseme¶
function GetChannels¶
Every channel any pose drives; a consumer binds exactly these.
function GetCurve¶
Current value of one channel (0 if it isn't driven).
function GetCurves¶
Smoothed value per channel after the last Tick, 0..1, aligned with GetChannels().
function GetSmoothingLagMs¶
Look-ahead applied for the smoothing delay, in milliseconds.
function Reset¶
Drops the track and eases back to rest.
function SetPoses¶
Replaces the pose table. Empty uses DefaultPoses().
function Tick¶
Advances to the audible position. PlayedSamples is FTryllTtsPlaybackClock::GetPlayedSamples().
Public Static Functions Documentation¶
function DefaultPoses¶
Hand-authored from published Oculus / VRChat viseme references (same table as the Unity client).
The documentation for this class was generated from the following file C:/_tryll/_monorepo3/tryll/clients/unreal/Source/TryllClient/Public/TryllVisemePlayer.h