Generation of waves due to a constant load moving uniformly along an infinite string resting on an inhomogeneous elastic foundation is studied. Two types of inhomogeneity are considered: (1) an abrupt change of the foundation stiffness: (2) a smooth change of the foundation stiffness. It is shown that transition radiation arises as the load passes the region of inhomogeneity. Expressions for the spectral density of the radiation energy forwards (in the direction of the load motion) and backwards are found and analysed as a function of the load velocity, the ratio of the foundation stiffness and a characteristic length of the inhomogeneity. To visualise the process of radiation the transient vibrations of the string are determined for an abrupt change of the stiffness.