Speed of sound in water by a direct method