UnrealVoxta 0.1.1
 
Loading...
Searching...
No Matches
UAudio2FacePlaybackHandler Class Reference

UAudio2FacePlaybackHandler Handles synchronization and playback of Audio2Face lipsync data with audio. More...

#include <Audio2FacePlaybackHandler.h>

Inheritance diagram for UAudio2FacePlaybackHandler:

Public Member Functions

void Initialize (UAudioComponent *audioComponent)
 Register the AudioComponent that will be used to sync the A2F lipsync data.
 
void GetA2FCurveWeights (TArray< float > &targetArrayRef)
 Fetch the curve values for the upcoming frame, mapping to the blendshapes of the ARKit.
 
void Play (const ULipSyncDataA2F *lipsyncData)
 Begin playback of the A2F lipsync data along with the audio in the AudioComponent.
 
void Stop ()
 Stop the playback and return to a lipsync state (closed mouth).
 
virtual void BeginDestroy () override
 Called when the object is being destroyed.
 

Static Public Attributes

static const int CURVE_COUNT = 52
 Number of ARKit blendshape curves.
 
static const FName CURVE_NAMES [CURVE_COUNT]
 Names of the ARKit blendshape curves.
 

Detailed Description

UAudio2FacePlaybackHandler Handles synchronization and playback of Audio2Face lipsync data with audio.

Each AI Character using A2F has one instance that manages its playback. Provides methods to initialize with an audio component, play/stop A2F lipsync data, and retrieve current curve weights for ARKit blendshapes.

Member Function Documentation

◆ BeginDestroy()

void UAudio2FacePlaybackHandler::BeginDestroy ( )
overridevirtual

Called when the object is being destroyed.

Ensures delegates are properly unbound before destruction.

◆ GetA2FCurveWeights()

void UAudio2FacePlaybackHandler::GetA2FCurveWeights ( TArray< float > & targetArrayRef)

Fetch the curve values for the upcoming frame, mapping to the blendshapes of the ARKit.

Should only be called in pre-update via the Animator.

Parameters
targetArrayRefThe array to populate with new curve values.

◆ Initialize()

void UAudio2FacePlaybackHandler::Initialize ( UAudioComponent * audioComponent)

Register the AudioComponent that will be used to sync the A2F lipsync data.

Parameters
audioComponentThe component to sync with A2F lipsync data.

◆ Play()

void UAudio2FacePlaybackHandler::Play ( const ULipSyncDataA2F * lipsyncData)

Begin playback of the A2F lipsync data along with the audio in the AudioComponent.

The correct soundwave must be assigned & loaded into the AudioComponent before calling this.

Parameters
lipsyncDataThe A2F data matching the SoundWave currently assigned to the AudioComponent.

◆ Stop()

void UAudio2FacePlaybackHandler::Stop ( )

Stop the playback and return to a lipsync state (closed mouth).

Member Data Documentation

◆ CURVE_COUNT

const int UAudio2FacePlaybackHandler::CURVE_COUNT = 52
static

Number of ARKit blendshape curves.

◆ CURVE_NAMES

const FName UAudio2FacePlaybackHandler::CURVE_NAMES
static

Names of the ARKit blendshape curves.


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