Forgive my ignorance but does a spectrogram carry all the information necessary to reproduce the sound that generated it? For example, assuming I had the spectrogram of a song, could I play the song using it?
The Discrete-Time Fourier Series is invertible. The problem is that for each pixel the Fourier series is a complex number and what is plotted is the magnitude (so the phase is not shown). Reconstructing a signal from only the magnitudes of the Fourier coefficients is ill-posed, i.e. there are multiple signals with the same Fourier coefficient magnitudes.
Still there is active research on reconstructing signals from only the Fourier magnitudes (under several assumptions). This is called the 'phase-retrieval problem'.
http://en.wikipedia.org/wiki/Phase_retrieval
Yes, the FFT/STFT[1] is generally invertible, potentially subject to knowing the parameters it was generated with, or finding some reference markers in the original input you could use to derive them.
There's also the possibility the spectrographic image itself might be a lossy representation of the actual frequency domain data, in which case you won't get a perfect result back out. Probably recognisable though.
If I had time I'd do some flubbing with octave/scipy and demonstrate it, but alas, the margins of this weekend are too small, etc, etc.
Still there is active research on reconstructing signals from only the Fourier magnitudes (under several assumptions). This is called the 'phase-retrieval problem'. http://en.wikipedia.org/wiki/Phase_retrieval