We study the vibrational spectrum of AlN grown on Si(111). The AlN was deposited using gas-source molecular beam epitaxy. Raman backscattering along the growth c axis and from a cleaved surface perpendicular to the wurtzite c direction allows us to determine the E-2(1), E-2(2), A(1)(TO), A(1)(LO), and E-1(TO) phonon energies. For a 0.8-mum-thick AlN layer under a biaxial tensile stress of 0.6 GPa, these are 249.0, 653.6, 607.3, 884.5, and 666.5 cm(-1), respectively. By combining the Raman and x-ray diffraction studies, the Raman stress factor of AIN is found to be -6.3 +/- 1.4 cm(-1)/GPa for the E-2(2) phonon. This factor depends on published values of the elastic constants of AlN, as discussed in the text. The zero-stress E-2(2) energy is determined to be 657.4 +/- 0.2 cm(-1). Fourier-transform infrared reflectance and absorption techniques allow us to measure the E-1(TO) and A(1)(LO) phonon energies. The film thickness (from 0.06 to 1.0 mum) results in great differences in the reflectance spectra, which are well described by a model using damped Lorentzian oscillators taking into account the crystal anisotropy and the film thickness.