As of 1/21/21: The mouth movement circuitry and test firmware appears to be working as designed. The servo-mouth definitely moves in synch with a spoken MP3 clip. There is a perceptual time lag as you average more samples, as expected. However, the mouth movement, while in synch with the audio, is not very convincing. I have noted that a "small" drop in audio sound level results in a seemingly much larger drop in mouth movement. I THINK that this may be due to the fact that human hearing is logarithmic whereas the sound (envelope) level mapping to servo movement is linear. Realism MIGHT be improved by some non-linear mapping of sound (envelope voltage) to servo movement which emphasizes low value sound samples more than high volume sound samples. Perhaps something like a 4 point linear mapping of A/D values to servo commands would work:
- Divide the mapping range (High - Low) of input A/D values into 4 equal sub-ranges.
- Multiply the lower range sound values by 4, the mid-low range sound values by 3, the mid-high range sound values by 2, and the high range sound values by 1.
- scale the mapped values to the servo movement range.
As of 1/21/21: The mouth movement circuitry and test firmware appears to be working as designed. The servo-mouth definitely moves in synch with a spoken MP3 clip. There is a perceptual time lag as you average more samples, as expected. However, the mouth movement, while in synch with the audio, is not very convincing. I have noted that a "small" drop in audio sound level results in a seemingly much larger drop in mouth movement. I THINK that this may be due to the fact that human hearing is logarithmic whereas the sound (envelope) level mapping to servo movement is linear. Realism MIGHT be improved by some non-linear mapping of sound (envelope voltage) to servo movement which emphasizes low value sound samples more than high volume sound samples. Perhaps something like a 4 point linear mapping of A/D values to servo commands would work: