Order of operations when creating a spectrogram
To get a spectrogram using existing libraries, it is usually easier to do it for a whole auduio clip. For example in Python with librosa, it is a single call (assuming the audio is already loaded): librosa.stft.
A streaming implementation requires a bit more care. You will then need tohandling the window function, the FFT operation on each window, and the overlapped extraction of the windows. Not very complicated, but a bit harder.
The primary benefit would be lower-latency and lower memory requirements. If these are not key requirements, I would recommend the clip-wise solution.