what determines the speed of the wave
Whenever the medium is the same, the speed of the wave is the same. However, when the medium changes, the speed changes. The speed of these waves were dependent upon the properties of the medium.