First of all, I know that it's not perfect but it looks really funny :D
I coded this for my new VR game, where a lot of conversations take place. It would have been a lot of work if I had to create for all the audio files a specific animation. So I thought, I would write some code to automate it. This is currently the result of it!
I'm developing my upcoming, big VR game in the game engine Unity for the VR headset HTC Vive. I wrote the code for the movement in C# an object-oriented programming language.
You probably already saw an audio visualization like this:
I used the same technique. My code creates an audio spectrum from an audio file. This spectrum is saved in an array. An array is a group of related data values (called elements) that are grouped together. In my case the elements are just numbers of the height positions (y value in a coordinate system) of the audio spectrum. Then these numbers are used to scale the mouth up or down and because it's from the audio file, it looks like a mouth movement!
Imagine a raging person :D