This is a Unity3D script to animate a 2D GameObject based on real-time audio clip amplitude.
It's easy to use: just attach the TalkTime script to a GameObject, and then add references to the GameObjects representing the mouth frames. The frames represent 0 to Max audio amplitude. I'm using four here in the demo, but it should work with as many frames as you'd like.
With some hacking, you could modify this to do anything, not just flip through frames. Go nuts. And send me any bug fixes or modifications.