I've read that phase vocoder is the STFT, but done in windows (i.e. using windowing).

Why is it called "phase vocoder"?


A vocoder is a type of synthesizer originally developed for speech (or the human voice, thus the "vo" prefix), even before the use of digital processors. The Bell Labs Voder was demonstrated in 1939, and VoCoders were reportedly used for encrypted voice communication during WW2 (according to Wikipedia).

DFTs can be used to analyze which audio spectrum peaks are to be used to "code" the speech, and short STFT windows are used to get a fine enough time resolution to isolate typical phonic atoms over reasonably stationary time periods.

But the frequency bin centers of a short FFT are not spaced with sufficient frequency resolution to capture pitch, overtones, and modulations thereof, accurately enough to sound human.

But, by taking into account the FFT phase information, the difference in the phase of FFT result bins between adjacent offset windows can be used to adjust (or interpolate) the apparent or actual frequency of the voice codec synthesizers to more accurately model narrow-band frequency peaks than by just using the magnitude alone of the STFT FFT results. Thus the "phase" prefix to the analysis-resynthesis vocoder process.

Note that if you slide two Windows apart, the amount of phase change of stationary spectrum should be linear with frequency. If analysis shows a little more phase change, the frequency is higher, a little less phase change, lower. And this phase difference will be measurable even for differences in frequency much less than the Fs/N bin spacing of each FFT. Thus there is information gain in using succesive frames and phase, rather than single frames and magnitude only, for the frequency estimation of narrow-band spectral peaks. Phase can either be stretched or compressed across frames during FFT resynthesis, or the frequency of higher resolution oscillators can be adjusted to match the estimated frequency during synthesis.

With increases in DSP performance, phase vocoders are now used for music as well as speech, but the "vo" prefix remains.


The short-time Fourier transform (STFT) refers to the time-frequency representation of a signal, which is given by:

$$X(\tau,\omega) = \int_{-\infty}^{\infty}x(t)w(t-\tau)e^{-j\omega t} \, dt$$

which is equivalent to:

$$ x(t)w(t-\tau) = \tfrac{1}{2\pi}\int_{-\infty}^{\infty} X(\tau,\omega) e^{+j\omega t} \, d \omega $$

If the window is scaled so that:

$$ \int_{-\infty}^{\infty} w(t) \, dt = 1 $$

$$ \int_{-\infty}^{\infty} w(t-\tau) \, dt = 1 \qquad \forall \tau \in \mathbb{R} $$

then (abusing notation):

$$\begin{align} x(t) &= x(t) \int_{-\infty}^{\infty} w(\tau) \, d \tau \\ &= x(t) \int_{-\infty}^{\infty} w(t-\tau) \, d \tau \\ &= \int_{-\infty}^{\infty} x(t) w(t-\tau) \, d \tau \\ &= \int_{-\infty}^{\infty} \ \tfrac{1}{2\pi}\int_{-\infty}^{\infty} X(\tau,\omega) e^{+j\omega t} \, d \omega \, d \tau \\ &= \tfrac{1}{2\pi} \int_{-\infty}^{\infty} \ \int_{-\infty}^{\infty} X(\tau,\omega) e^{+j\omega t} \, d \tau \, d \omega \\ &= \tfrac{1}{2\pi} \int_{-\infty}^{\infty} \ \int_{-\infty}^{\infty} X(\tau,\omega) \, d \tau \, e^{+j\omega t} \, d \omega \\ &= \tfrac{1}{2\pi} \int_{-\infty}^{\infty} \ X(\omega) \, e^{+j\omega t} \, d \omega \\ \end{align} $$


$$\begin{align} X(\omega) &= \int_{-\infty}^{\infty} X(\tau,\omega) \, d \tau \\ &= \int_{-\infty}^{\infty} x(t) e^{-j\omega t} \, dt \\ \end{align} $$

That is, computing the STFT of a signal $x(t)$ given a time $\tau$ and frequency $\omega$ consists of time-shifting the analysis window $w(t)$ such that it is centred at time $\tau$, multiplying the input signal $x(t)$ with it and computing the Fourier transform of the resulting signal $x(t)w(t-\tau)$. Alternatively, it can be viewed as modulating the input signal with the complex exponential $e^{-j\omega t}$ and convolving the resulting signal $x(t)e^{-j\omega t}$ with the time-reversed window function $w(t)$. A good resource on these two points of view is J.O. Smith's Spectral Audio Signal Processing.

The phase vocoder, however, refers to the analysis and synthesis procedure, where the analysis stage consists of computing the STFT of the input signal, and the synthesis stage consist of re-synthesising the "coded" signal from its STFT coefficients. Additionally, instead of directly using the phase values from the STFT analysis, in the phase vocoder, the phase derivative in the time direction is estimated and used instead. The phase derivative in the time-direction is known as the "instantaneous frequency" of the STFT bin. This technique was originally applied (in the work of Flanagan and Golden (1966)), because the phase derivative in the time direction is a more well-behaved signal than the phase values themselves, and thus more suitable for transmission using a small bandwidth.

Finally, the name phase vocoder (voice coder) was probably used to point out the most important difference to the original channel vocoder of Dudley (1939), which only stored the time-varying magnitude of the sub-band signals, which was obtained by analysing the signal with an analog bandpass filter bank. Because the phase information is also used in the phase vocoder, it allows perfect reconstruction of the original signal from the analysis STFT coefficients, given that certain criteria are met.

  • $\begingroup$ this is a good answer. $\endgroup$ Jan 8 '18 at 22:32
  • $\begingroup$ i added how the inverse STFT comes about in continuous time. feel free to revert it. $\endgroup$ Jan 8 '18 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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