Sound is a mechanical wave and medium does play an important role in the propagation of sound. Sound is basically variations in the medium particles only. The speed of sound varies with the density, temperature and the pressure of the medium particles.