I'm using a wave shield on the arduino for playback of voice/wav files, and was wanting to know if anyone has a good way to maybe pre-process the wav files so that the servo can move a mouth in synch.
Most of the voice synched servos seem to be triggered by the volume of the wav file, which makes them seem to be a half a second or so out of phase, since the mouth is told to move as the sound triggers, not a fraction of a second or so before like a real mouth.
Could the wav file perhaps play to some null output to gauge the volume to trigger the servo, then play the actual wav 200 ms or so after the volume peak?
I know it's possible to script the movement of the servo so that it is in synch with a file, but if there's a long file, or frequently changing file, that option wouldn't be too great.
Could you modify the code to look a few thousand samples ahead to drive the servo?
Or, could you use the bottom bit of the sample to encode a mouth-open/closed track? It would probably make the wav a iny bit noisy but...
You'd have to run the file through something like a processing app that would look a few thousand samples ahead and replace the bottom bit of the sample with the signal.