Considering the change in refractive index of medium for light propagation, the sounds speed of liquid are measured in experiment using the principle of acousto-optic effect. Results show that the error is significantly reduced for considering the refractive index. Furthermore, the effect of the refractive index on the measurement accuracy is discussed. And a good fitted result is presented.