Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lipsync stuck on last phoneme/blendshape when audio source's audio clip assigned to none #71

Open
niiteshk0 opened this issue May 30, 2024 · 3 comments

Comments

@niiteshk0
Copy link

I have added a logic on a button to assign the audio source's audio clip present on the gameobject which has the ulipsync script to none/null, as a way to make the ulipsync 3d avatar stop speaking mid sentence, But there is a bug occuring such that when I execute my logic then the 3d avatar's mouth is left with the last used phoneme/blendshape extended as it was, which gives it a wierd look.

This problem is not occuring in editor but only in webgl builds.

Any help is appreciated.
Thanks!

Screenshot 2024-05-30 175035

Screenshot 2024-05-30 174520

@Thaina
Copy link

Thaina commented Dec 26, 2024

I have experience that in webgl changing audioclip cause bug in audiosource that it only return 0 on PlayOneShot

Using PlayDelayed 0.1 work

Maybe related? It seem webgl audio has many difference about loading than other platform

@hecomi
Copy link
Owner

hecomi commented Dec 31, 2024

I apologize for the very delayed response. Yes, as you mentioned, PlayOneShot cannot be used in WebGL. With PlayOneShot, the AudioSource.clip property is not updated when called. Instead, it internally manages the AudioClip as a list and handles it directly. As a result, data cannot be retrieved via AudioSource.clip.GetData(), leading to the issue where lipsync was not functioning properly.

The detailed investigation is documented in the blog post below:

@hecomi
Copy link
Owner

hecomi commented Dec 31, 2024

On WebGL, the logic differs from the editor, so AudioSource.clip might not be properly checked for None, which could cause it to fail to stop correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants