met4citizen / TalkingHead

Talking Head (3D): A JavaScript class for real-time lip-sync using Ready Player Me full-body 3D avatars.
MIT License
349 stars 107 forks source link

Callback for speech end #37

Closed anmol1905 closed 6 months ago

anmol1905 commented 6 months ago

Hello,

Amazing work! Is there any way to know that the speech ended after calling the head.speakAudio() function?

met4citizen commented 6 months ago

Thanks! Yes, once you have called the head.speakAudio, you can add a new marker to the speech queue by calling head.speakMarker(onmarker). The callback function onmarker is called when the class reaches the marker, which will be right after the audio has ended.