Gust/turbulence–leading edge interaction is a significant source of airfoil broadband noise. An approach often used to predict the sound is based on Amiet’s flat-plate solution. Analytical studies have been conducted to investigate the influences of airfoil geometries, non-uniform mean flows and turbulence statistics, which, however, were often too convoluted. In this work, the problem is revisited by proposing simple corrections to the standard flat-plate solution to account for the effect of non-uniform mean flows of real airfoils. A key step in the method is to use a new space–time transformation that is analogous to the Prandtl–Glauert transformation to simplify the sound governing equation with spatially varying coefficients to a classical wave equation, which is then solved using the Schwarzschild technique as in Amiet’s solution. The impacts of Mach number, wavenumber and airfoil geometry on the prediction accuracy are investigated for both single-frequency and broadband cases, and the results are compared against high-fidelity simulations. It predicts the sound reduction by the airfoil thickness, and reveals that the reduction is caused by the non-uniform streamwise velocity. The limitations of the model are discussed and the approximation errors are estimated. In general, the prediction error increases with the airfoil thickness, the sound frequency and the flow Mach number. Nevertheless, in all cases studied in this work, the proposed correction can effectively improve the prediction accuracy of the flat-plate solution much more efficiently compared to numerical solutions of the Euler equations using computational aeroacoustics.