Stochastic excitation of acoustic modes in stars