We undertake a careful analysis of stochastic gravitational wave production from cosmological phase transitions in an expanding universe, studying both a standard radiation as well as a matter dominated history. We analyze in detail the dynamics of the phase transition, including the false vacuum fraction, bubble lifetime distribution, bubble number density, mean bubble separation, etc., for an expanding universe. We also study the full set of differential equations governing the evolution of plasma and the scalar field during the phase transition and generalize results obtained in Minkowski spacetime. In particular, we generalize the sound shell model to the expanding universe and determine the velocity field power spectrum. This ultimately provides an accurate calculation of the gravitational wave spectrum seen today for the dominant source of sound waves. For the amplitude of the gravitational wave spectrum visible today, we find a suppression factor arising from the finite lifetime of the sound waves and compare with the commonly used result in the literature, which corresponds to the asymptotic value of our suppression factor. We point out that the asymptotic value is only applicable for a very long lifetime of the sound waves, which is highly unlikely due to the onset of shocks, turbulence and other damping processes. We also point out that features of the gravitational wave spectral form may hold the tantalizing possibility of distinguishing between different expansion histories using phase transitions.