onFaceInfo
Reports the face information processed by the voice driver plugin.
final void Function(String outFaceInfo)? onFaceInfo;
Parameters
- outFaceInfo
- Output parameter. A JSON string of face information processed by the voice driver plugin, containing the following fields:
- faces: Array of objects. Contains information of detected faces, each face corresponds to one object.
- blendshapes: Object. Blend shape coefficient set, named according to ARkit standards. Each key-value pair represents a blend shape coefficient. The coefficient is a float ranging from [0.0, 1.0].
- rotation: Array of objects. Head rotation values, including the following three key-value pairs, with float values ranging from [-180.0, 180.0]:
- pitch: Head pitch angle. Positive when looking down, negative when looking up.
- yaw: Head yaw angle. Positive when turning left, negative when turning right.
- roll: Head roll angle. Positive when tilting right, negative when tilting left.
- timestamp: String. Timestamp of the output result in milliseconds.
Return Values
- true: Face information JSON parsed successfully.
- false: Face information JSON parsing failed.