Navigation
API > API/Plugins > API/Plugins/MetaHumanSpeech2Face > API/Plugins/MetaHumanSpeech2Face/FSpeech2Face
Description
Generates RigLogic face animation based on the input audio. Generated animation uses the so called "face board" rig controls.
Raw animation is generated at 50 FPS which is then resampled to the specified FPS using the nearest neighbour algorithm.
| Name | GenerateFaceAnimation |
| Type | function |
| Header File | /Engine/Plugins/MetaHuman/MetaHumanAnimator/Source/MetaHumanSpeech2Face/Public/Speech2Face.h |
| Include Path | #include "Speech2Face.h" |
| Source | /Engine/Plugins/MetaHuman/MetaHumanAnimator/Source/MetaHumanSpeech2Face/Private/Speech2Face.cpp |
METAHUMANSPEECH2bool GenerateFaceAnimation
(
const FAudioParams & InAudioParams,
float InOutputAnimationFps,
bool bInGenerateBlinks,
TFunction < bool> InShouldCancelCallback,
TArray < FAnimationFrame > & OutAnimation,
TArray < FAnimationFrame > & OutHeadAnimation
)
Returns true if the operation was successful and false otherwise.
Parameters
| Name | Remarks |
|---|---|
| InAudioParams | Parameters for the audio - USoundWave asset, start offset and channel from the asset that should be used. |
| InOutputAnimationFps | The FPS that the output animation should have. |
| bInGenerateBlinks | Option to generate blink animation |
| OutAnimation | Generated animation. Each AnimationFrame is map that maps a rig control to it's value for that frame. |
| OutHeadAnimation | Generated animation for the head pose. Each AnimationFrame is map that maps a rig control to it's value for that frame. |