How to change the speed of an animation depending on speed

What exactly is the problem? You can get the speed of the character, and proceed from it to change the speed of the animation.