junhwanjang / visemenet-inference

3D Avatar Lip Synchronization from speech (JALI based face-rigging)
Apache License 2.0
73 stars 15 forks source link

Warning, truncation. #2

Open onehundredfeet opened 1 year ago

onehundredfeet commented 1 year ago

I am getting this while running it:

WARNING:root:frame length (1103) is greater than FFT size (512), frame will be truncated. Increase NFFT to avoid.

My file is 44100 hz, as the original one states.

fadiaburaid commented 1 year ago

I am getting the same warning as well even with the sample files. However, I don't know whether it affects the output. I don't use Maya so I have no way to test it. I was planning to use Three.js to control the rig blendshapes but this will take some time.

jh-gglabs commented 1 year ago

Hi, I have found a related issue. The time at converting to speech feature using python_speech_features would make some problems.

fadiaburaid commented 1 year ago

After testing the viseme output on actual avatar rig, I can confirm that the warning has no effect. Just make sure the input wav file has a sample rate of 44100hz. The results are not the best because I am using an avatar with Oculus viseme format not a JALI rig so I had to do a conversion. I am sure I can improve on that.

https://github.com/junhwanjang/visemenet-inference/assets/28487342/170ce2f0-a415-41c2-90be-a1067bc1c9e5

jh-gglabs commented 1 year ago

@fadiaburaid Thanks for sharing, it looks nice though, can you share how to do the conversion from JALI to Oculus viseme format?

fadiaburaid commented 1 year ago

@jh-gglabs I just map the visemes to their Oculus equivalent ones (Look at the table below). If multiple visemes with the same representation fire up at the same time I take the average. Something still doesn't seem right I am still experimenting. I wanted to use Ovrlipsync as it has better performance from my experience with it in Unity. I managed to find the model, but I am still unable to view the model graph and do the inference.

index JALI Oculus Representation
0 Jaw Not used
1 Lip Not used
2 Ah aa
3 Aa aa
4 Eh E
5 Ee E
6 Ih I
7 Oh O
8 Uh U
9 U U
10 Eu E
11 Schwa E
12 R RR
13 S SS
14 Sh Ch Zh CH
15 Th TH
16 JY CH
17 LNTD RR
18 GK kk
19 MBP PP
20 FV FF
21 WA_PEDAL Not Used
junhwanjang commented 1 year ago

Thanks for sharing :)