Text this: Refraction-Based Speed of Sound Estimation in Layered Media