onFaceInfo property

void Function(String outFaceInfo)? onFaceInfo
final

报告已获取语音驱动插件处理后的人脸信息。

  • outFaceInfo 输出参数,语音驱动插件处理后的人脸信息 JSON 字符串,包含以下字段: faces:Object 序列。包含识别到的人脸信息,每一张人脸对应一个 Object。 blendshapes:Object。面捕系数集,命名符合 ARkit 标准,内部的键值对为每一个 blendshape 系数。blendshape 系数为浮点,取值范围为 0.0,1.0。 rotation:Object 序列。头部旋转量,包含以下三个键值对,取值为浮点数,范围为 -180.0,180.0: pitch:头部俯仰角度。低头为正值,抬头为负值。 yaw:头部水平旋转角度。左转为正值,右转为负值。 roll:头部垂直旋转角度。右倾为正值,左倾为负值。 timestamp:String。输出结果的时间戳,单位为毫秒。 以下为 JSON 示例: { "faces":{ "blendshapes":{ "eyeBlinkLeft":0.9, "eyeLookDownLeft":0.0, "eyeLookInLeft":0.0, "eyeLookOutLeft":0.0, "eyeLookUpLeft":0.0, "eyeSquintLeft":0.0, "eyeWideLeft":0.0, "eyeBlinkRight":0.0, "eyeLookDownRight":0.0, "eyeLookInRight":0.0, "eyeLookOutRight":0.0, "eyeLookUpRight":0.0, "eyeSquintRight":0.0, "eyeWideRight":0.0, "jawForward":0.0, "jawLeft":0.0, "jawRight":0.0, "jawOpen":0.0, "mouthClose":0.0, "mouthFunnel":0.0, "mouthPucker":0.0, "mouthLeft":0.0, "mouthRight":0.0, "mouthSmileLeft":0.0, "mouthSmileRight":0.0, "mouthFrownLeft":0.0, "mouthFrownRight":0.0, "mouthDimpleLeft":0.0, "mouthDimpleRight":0.0, "mouthStretchLeft":0.0, "mouthStretchRight":0.0, "mouthRollLower":0.0, "mouthRollUpper":0.0, "mouthShrugLower":0.0, "mouthShrugUpper":0.0, "mouthPressLeft":0.0, "mouthPressRight":0.0, "mouthLowerDownLeft":0.0, "mouthLowerDownRight":0.0, "mouthUpperUpLeft":0.0, "mouthUpperUpRight":0.0, "browDownLeft":0.0, "browDownRight":0.0, "browInnerUp":0.0, "browOuterUpLeft":0.0, "browOuterUpRight":0.0, "cheekPuff":0.0, "cheekSquintLeft":0.0, "cheekSquintRight":0.0, "noseSneerLeft":0.0, "noseSneerRight":0.0, "tongueOut":0.0 }, "rotation":{"pitch":30.0, "yaw":25.5, "roll":-15.5}, }, "timestamp":"654879876546" }

Returns true : 人脸信息 JSON 解析成功。 false : 人脸信息 JSON 解析失败。

Implementation

final void Function(String outFaceInfo)? onFaceInfo;