The present study aims at developing an acoustic formulation for the sound generated by the interaction of solid surfaces (such as blades) with an unsteady flow in an annular duct with swirl. Indeed, the mean flow in between the rotor and the stator of the fan or of a compressor stage is highly swirling. As a result, in order to properly predict the rotor self-noise radiated downstream of the rotor or the rotor-stator interaction noise radiated upstream of the stator, the swirling mean flow effect must be accounted for, either in the source terms or in the differential operator in an acoustic analogy. The proposed approach here, is to develop an acoustic analogy with an operator accounting for the swirl. It can be seen as an extension of Goldstein formulation in uniform mean flow (Aeroacoustics, 1976). The Navier-Stokes equations are first recast to obtain the differential operator and the associated equivalent noise sources in space and time. Then, the Green's function tailored to the rigid annular duct with swirl is derived in the frequency domain. Finally, the formulation to be used in the fan noise context is outlined.