The speed of sound depends on the medium through which it travels. It is generally highest in solids, intermediate in liquids, and lowest in gases. Sound cannot travel through a vacuum.