5
$\begingroup$

I have the absolute Spectrogram of an audio signals.
I lost the phase data of the Spectogram because of various processing applied on the original spectrogram of the signal.

I'm trying to reconstruct the audio signal in a meaningful (Audibly) manner from teh absolute value only of the Spectrogram.
The obvious inverse won't work (The DFT inverse of the absolute, Since the Phase is significant).

The Spectrogram is a result of fusion of few audio signals as I'm trying to create a smooth transition between audio signals.

Anyone has experience with the problem? Anyone has experience with this procedure? Could anyone refer me to a code, article, etc...

Thanks.

$\endgroup$

3 Answers 3

7
$\begingroup$

One thing commonly done (for example in the source separation community) is to use the phase data of the original signal (before transformation where applied to it) - the result is much better than null or random phase, and not so far from algorithms aiming at reconstructing the phase information from scratch.

A classic reconstruction algorithm is Griffin&Lim's, described in the paper "Signal estimation from modified short-time Fourier transform". This is an iterative algorithm, each iteration requires a full STFT / inverse STFT, which makes it quite costly.

This problem is indeed an active area of research, a search for STFT + reconstruction + magnitude will yield plenty of papers aiming at improving on Griffin&Lim in terms of signal quality and/or computational efficiency.

$\endgroup$
4
  • $\begingroup$ Hello @pichenettes, Thank you for your answer. The problem is the Spectrogram I have is a result of merging few audio signals. I'm trying to create a smooth transition between few audio signals. Hence I can't take the original signal phase as there is no such thing. Do you have idea for that case? Thank You! $\endgroup$
    – Royi
    Commented Sep 23, 2012 at 11:51
  • 1
    $\begingroup$ The paper that pichenettes suggested works for your case. Take a look at it. $\endgroup$
    – Deniz
    Commented Sep 23, 2012 at 12:35
  • $\begingroup$ Yes, the Griffin&Lim approach can be initialized with just random phase information, so even if you have absolutely no information about the original signals, it can be used. $\endgroup$ Commented Sep 23, 2012 at 14:13
  • $\begingroup$ There is also a Fast Griffin-Lim Algorithm. $\endgroup$ Commented Nov 4, 2018 at 11:44
7
$\begingroup$

To make it clear, I can summarise the reconstruction from magnitude coefficients algorithm as follows, I took the algorithm from this paper. (See Experiment 1).

Take a random input signal $x$, it can be noise. And denote your magnitude of the STFT as $|Y|$. Denote $S$ as the STFT operator.

Iteratively, you have to perform following steps,

  1. Perform $X = S(x)$
  2. Compute $Z = |Y| \exp(i \angle X)$
  3. $x = S^{-1}(Z)$
$\endgroup$
1
  • $\begingroup$ Is the multiplication of |Y| and the exp() term element-by-element multiplication? $\endgroup$
    – adam.baker
    Commented Aug 7, 2017 at 9:20
4
$\begingroup$

To (re)create a signal containing more information content than what one has, one has to make some assumptions. The construction process will only be as good as the correctness of the assumptions.

If you assume the original signal was spectrally sparse and the spectrogram was created from frames with a known constant offset, then peak interpolation and minimization of transients produced by those interpolated spectral peaks between adjacent frames can be used as a "reverse phase vocoder" estimator of the change in phase between frames. You will need a starting phase; but arbitrary might work.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.