registerFaceInfoObserver
Registers or unregisters a facial information observer.
virtual int registerFaceInfoObserver(IFaceInfoObserver* observer) = 0;
Details
- Since
- v4.3.1
You can call this method to register the onFaceInfo callback to receive the facial information processed by Agora speech driven extension. When calling this method to register a facial information observer, you can register callbacks in the IFaceInfoObserver class as needed. After successfully registering the facial information observer, the SDK triggers the callback you have registered when it captures the facial information converted by the speech driven extension.
- Call this method before joining a channel.
- Before calling this method, you need to make sure that the speech driven extension has been enabled by calling enableExtension.
Applicable scenarios
Facial information processed by the Agora speech driven extension is BS (Blend Shape) data that complies with ARkit standards. You can further process the BS data using third-party 3D rendering engines, such as driving avatar to make mouth movements corresponding to speech.
Parameters
- observer
- Facial information observer, see IFaceInfoObserver. If you need to unregister a facial information observer, pass in NULL.
Returns
- 0: Success.
- < 0: Failure.