Noise generated by flow over rough surfaces is an important issue in naval applications and in aeronautical engineering. This work numerically investigates roughness-induced noise from low-Mach-number turbulent boundary layers. The computational approach is based on Lighthill's acoustic analogy with acoustic sources obtained from large-eddy simulation. An acoustic formulation is derived, which shows that each roughness element acts as an individual in-plane dipole source strengthened by its image in the wall. Flow configurations investigated include boundary-layer flows over a single hemispherical roughness element, a pair of streamwisely aligned hemispherical elements and three roughness fetches consisting of 10ÌÑ4 hemispherical, cuboidal and cylindrical roughness elements, respectively. Results for a single hemispherical roughness element and a pair of hemispherical elements show that the spanwise dipole, which has been overlooked before, is of larger or similar strength compared to the streamwise dipole. The viscous contribution to the dipoles is negligible compared to the pressure contribution. The main sound sources arise from the impingement of incoming turbulence and the unsteady horseshoe vortices generated around the element. The roughness-induced unsteady wake motions are unimportant as a source of self noise. However, they significantly enhance sound radiation from a downstream hemisphere. The effects of multi-element interactions and the roughness shape are investigated with arrays of 10ÌÑ4 sparsely distributed hemispheres, cuboids and short cylinders. The dipole strength, orientation and spatial distribution show strong dependence on the roughness shape. Correlations between dipole sources associated with neighboring elements are found to be small for these sparsely distributed roughness arrays. Correlations and coherence between roughness dipoles and surface pressure fluctuations are analyzed, which reveals the importance of the impingement of upstream turbulence and surrounding vortical structures to dipole sound radiation, especially in the streamwise direction. For roughness shapes with sharp frontal edges, the edge-induced unsteady separation and reattachment also play important roles in sound generation. Large scale turbulent structures in the boundary layer have a relatively low influence on roughness dipoles, except for the first row of elements.