The kinetic energy of particles in a medium affects the speed at which sound propagates.
For bulk motion of particles (e.g. wind), the wind velocity is added directly to the sound propagation velocity.
For thermal motion of particles (which temperature measures), holding pressure and chemical composition constant, the speed of sound varies as the square root of absolute Kelvin temperature.
Your diagram is not correct. It appears to be a diagram of a transverse wave.
Your statement "particles of any medium vibrate when we give them more kinetic energy" is not quite right. When we give particles more kinetic energy, they go faster, just like when you give a tennis ball more kinetic energy. In a solid, they do vibrate, because there's nowhere to go. As soon as they start going faster, they encounter a strong restoring force. This accelerates them back until they're going fast the other direction, where they encounter another strong restoring force, and so on; this is where the vibration comes from. In a gas, the motion does not resemble vibration. There is lots of empty space for the molecules to move around in, so they spend most of their time at constant velocity, with occasional very brief collisions with other particles. This is why heating a gas increases the propagation rate of the wave, at the microscopic level: higher thermal energy and hence faster root-mean-square velocity of particles means they spend less time on the way between getting bumped by a vibration over here and bumping into an air particle over there, and so on all along the air column until eventually a particle bumped by a particle bumped by a particle etc bumps into the detector.