grrrr/nsgt

How to reconstruct audio signal from the spectrogram (output of assemble_coeffs)

binarygo opened this issue · 3 comments

Hello

Thanks a lot for the nice package! I am looking for a "lossless way" to convert audio signal to spectrogram (in mel scale) and back to audio signal again. This seems to be a great solution.

However, after calling the assemble_coeffs() to construct spectrogram from CQT slices. How do I transform the spectrogram back to CQT slices (and thus backward() to audio signal again)? The overlap-add operation in the assemble_coeffs() seems to be irreversible.

Sorry for the dumb question, but it will be great if you could help on this. Thanks!

Hey Binarygo, did you ever figure out how to do this?

grrrr commented

Hi all, not sure whether i understand it right. Have you had a look at examples/transform_stream.py ?
It seems it does what you want to achieve - only the frequency scale needs to be modified.

Hi, dont mean to jack the thread. But to convert an audio file to a spectrogram, am I doing "python spectrogram.py myaudio.wav --output image.npz" ? And for the reconstruction I am to use transform_stream.py? Also how do I get an image out of the npz once it's created?