3

I have an audio magnitude spectrogram but I don't have the phase, try to randomize the phases of each container and then make a reverse fourier, but only pure noise is heard

How can I reconstruct the phase information so that the audio is heard somewhat decent.

Anyone know an algorithm that does this?

molo32
  • 199
  • 2
  • I know that if you use a Gaussian window there is a direct mathematical relationship between magnitude and phase. I’ve done the paper derivation before but it was years ago. Maybe someone here knows of a reference to the relationship? – Dan Szabo Aug 19 '19 at 13:33

2 Answers2

1

In general the whole complex Fourier transform is needed to reconstruct the time domain signal.

However, it's possible to reconstruct a real signal it from its Fourier transform magnitude alone (or phase alone) by using some iterative techniques, or very large matrix solutions.

Have a look at the papers by Monson Hayes...

Fat32
  • 28,152
  • 3
  • 24
  • 50
1

Your question is at the heart of a still-current topic in signal processing or image analysis, often under the names phaseless recovery or phase retrieval.

For instance, in January 2019, Yoshiki Masuyama et al. published a paper on phase recovery from amplitude spectrograms: Griffin-Lim like phase recovery via alternating direction method of multipliers (Signal Processing Letters). Once again, deep learning kicked in data processing: the Yoshiki Masuyama et al. published a conference paper (ICASSP 2019, May) on Deep Griffin–Lim Iteration.

Some Matlab code is provided on Yoshiki Masuyama web page, with the abbreviation ADMMGLA --- alternating direction method of multipliers (ADMM) and Griffin–Lim algorithm (GLA).

You can find older references, with keyword "spectrogram inversion", like the Phase Retrieval Toolbox for LTFAT, the The Large Time-Frequency Analysis Toolbox.

Laurent Duval
  • 31,850
  • 3
  • 33
  • 101
  • 1
    actually the basic exact algorithm for signal recovery from phase alone (or magnitude vice versa) is quite old & simple and I have it implemented in my matlab. But it requires a very large matrix solution... Hence, new iterative techniques are investigated instead possibly. – Fat32 Aug 19 '19 at 16:16
  • Implementing the basic version is something I should have done, which I did not. Which reference did you use? – Laurent Duval Aug 19 '19 at 16:24
  • 1
    From the book 2D signal and image processing Jae S Lim ch.1 gives a definition... – Fat32 Aug 19 '19 at 16:29
  • 1
    here the link: http://i65.tinypic.com/15p3mv9.jpg – Fat32 Aug 19 '19 at 16:40
  • 1
    Retrieved, excellent – Laurent Duval Aug 19 '19 at 16:45