A simple method for calculating the speed of sound in tight-binding models: application to the SSH model