The theory of the luminescence of heavily doped semiconductors developed (see Sov. Phys. Semicond. , v 7, n 6, Dec 1973, p 721) on the assumption that the distribution of carriers in the density-of-state tails is not in quasiequilibrium is applied to the calculation of the luminescence spectra of heavily doped nondegenerate semiconductors. The form of the density-of-states distribution is considered for the cases of greatest interest from the experimental point of view. The profile of the luminescence line is determined and its position is calculated as a function of the impurity concentration, temperature, and pumping level. The transient characteristics of the luminescence are considered. The dependence of the characteristic luminescence decay time on the luminescence frequency is found. The results obtained make it possible to explain in a unified manner all the principal relationships discovered in experimental investigations of the photoluminescence and electroluminescence of heavily doped compensated semiconductors.