nsgt icon indicating copy to clipboard operation
nsgt copied to clipboard

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

Open binarygo opened this issue 7 years ago • 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!

binarygo avatar May 15 '18 17:05 binarygo

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

jeremydeanw avatar Feb 20 '19 07:02 jeremydeanw

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.

grrrr avatar Feb 21 '19 22:02 grrrr

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?

jeremydeanw avatar Feb 22 '19 03:02 jeremydeanw