FaceFX & Unity- Mouth left open after some animations


We are using FaceFX Studio and Unity for a project. Everything is setup and working, the model's face animates to match audio fine. But we are hitting a weird bug where after some animations, the model's mouth is left halfway open. I've checked the animations in FaceFX Studio and the mouth is completely closed at the end of the face animations. I've also checked the animations in Unity and they have keys to return the mouth to being fully closed at the end, so I don't know what could be causing the mouth not to close all the way, sometimes. I've tried calling to play the "facefx_loop_anim" once an animation is finished and that didn't make a difference. I also tried adding in a "blank" animation with silent audio and called it to be played once an animation was finished, but that also didn't work. Do you have any ideas what could be the cause? Or would you need to see the project files to try and find out?

Unity: 2019.3.13f1
Platform: WebGL
FaceFX Studio: 2018.1

I don't know what would be causing this. But the first thing I would check is if the audio end time is before the animation end time. If so, is the mouth left open at the audio end time in the animation? You could create a test where you create a long animation with short audio and see if the animation plays all the way through to the end, or if it stops at the end of the audio.
So my first guess is that there might be something specific to your game/implementation that stops the animation when the audio stops, and that leaves the mouth open.

Thank you for your suggestion about the animation being cut off when the audio finished. I was thinking something was happening after the animation. But, your guess was correct. I had added in caching the previous frame's audio time and comparing it to the current audio time to prevent the bug where the face animation played twice (since WebGL resets the audioComponent.time to 0 when it's finished). I didn't get the logic to move to the POST_AUDIO play state correct, so it would sometimes skip to the READY play state and cut off the animation before it was finished. Thanks again for pointing me in the right direction.