Reports face information processed by the voice driver extension.
onFaceInfo?(outFaceInfo: string): void;
Parameters
- outFaceInfo
- Output parameter. A JSON string of face information processed by the voice driver extension, containing the following fields:
- faces: Array of objects. Contains detected face information, with each object representing one face.
- blendshapes: Object. Blend shape coefficients conforming to the ARKit standard. Each key-value pair represents a blendshape coefficient as a float in the range [0.0, 1.0].
- rotation: Array of objects. Head rotation angles, including the following key-value pairs with float values in the range [-180.0, 180.0]:
- pitch: Head tilt angle. Positive when looking down, negative when looking up.
- yaw: Horizontal head rotation. Positive when turning left, negative when turning right.
- roll: Vertical head rotation. Positive when tilting right, negative when tilting left.
- timestamp: String. Timestamp of the output result in milliseconds.
Example 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"}
Return Values
- true: Face info JSON parsed successfully.
- false: Failed to parse face info JSON.