How a Vocoder Works · Volume 7
How a Vocoder Works — Vol 07: Digital Vocoders and Cousins
The word vocoder now covers at least four different machines. There is the channel vocoder of Vols 1–6, analogue or digital. There is the phase vocoder, a 1966 Bell Labs reinterpretation of the filter bank as a Fourier transform, which is behind every time-stretch and many pitch-shift algorithms and does not, by default, make anything sound like a robot. There is linear prediction, which models the vocal tract directly instead of sampling its envelope and which carries most of the world’s telephone speech. And there is the neural vocoder, the network at the end of a modern text-to-speech system. Around them cluster the devices that are not vocoders but are constantly called vocoders: the talk box, the Sonovox, Auto-Tune, the harmonizer and the formant filter. This volume explains each with enough mathematics to see how it relates to the analogue filter bank, and closes with a table that settles what is what.
7.1 The channel vocoder in software
7.1.1 Direct translation: an IIR filter bank
The analogue design translates directly into digital signal processing. Each band-pass filter becomes a biquad — a second-order recursive filter, the digital counterpart of one MFB section — and each envelope follower becomes an absolute value (or square) followed by a one- or two-pole low-pass. The VCA becomes a multiplication; the summing amplifier an addition. Everything in Vols 2–4 applies unchanged, including the polarity question of Vol 4 §5, with three practical differences:
- Perfect matching. Analysis and synthesis filters can share coefficients exactly. The tolerance arithmetic of Vol 2 §8 disappears.
- No breakthrough. A digital multiplication has no offset voltage, so the control-voltage breakthrough of Vol 4 §3 does not exist.
- Cheap channels. A biquad costs five multiplications per sample. Forty second-order bands, analysis and synthesis, at 48 kHz come to about 19 million multiplications a second for the filters — trivial for any modern processor. Commercial software ranges from Logic’s EVOC 20 (up to 20 bands, with a U/V detector; Apple) to Reason’s BV512 (4 to 512 bands; Wikipedia, “List of vocoders”).
Hardware keyboards of the 2000s took the same route with DSP chips: Korg’s microKORG has an 8-band vocoder built from 16 filters used in pairs, the MS2000 a 16-band vocoder, both with per-band level and pan and formant shift (The Vocoder in Music brief, citing Korg and retailer pages).
7.1.2 Worked example: an MFOS band as a biquad
The standard recipe for a constant-peak-gain digital band-pass (R. Bristow-Johnson’s Audio EQ Cookbook, the reference most audio DSP code follows) computes, for centre f₀, quality factor Q and sample rate f_s:
ω₀ = 2πf₀/f_s, α = sin ω₀ / 2Q
b₀ = α, b₁ = 0, b₂ = −α; a₀ = 1 + α, a₁ = −2 cos ω₀, a₂ = 1 − α
and the filter runs as y[n] = (b₀x[n] + b₂x[n−2] − a₁y[n−1] − a₂y[n−2]) / a₀.
For the MFOS 1,013 Hz channel (Q 3.9) at f_s = 48 kHz: ω₀ = 2π × 1,013 / 48,000 = 0.13260 rad/sample; sin ω₀ = 0.13221, cos ω₀ = 0.99122; α = 0.13221 / 7.8 = 0.016950. Normalised by a₀ = 1.016950:
b₀ = 0.016668, b₂ = −0.016668, a₁ = −1.949400, a₂ = 0.966664.
The gain at ω₀ evaluates to exactly 1 (0 dB) and the poles sit at radius √0.966664 = 0.9832, just inside the unit circle — a resonance whose impulse response decays by a factor of 0.9832 per sample. Two things are worth noticing. The coefficients a₁ and a₂ are close to −2 and 1, so the filter needs adequate numerical precision: in 16-bit fixed point a low-frequency, high-Q biquad rounds its poles noticeably, which is why audio DSP uses 32-bit floating point or double-precision feedback paths. And the analogue design maps across exactly: the same f₀ and Q from Wilson’s table give the same response shape, apart from a slight compression of the frequency axis near f_s/2 (the bilinear transform’s warping), negligible at 1 kHz with a 48 kHz sample rate.
7.1.3 The digital envelope follower
A one-pole smoother in discrete time is y[n] = a·y[n−1] + (1 − a)·|x[n]|, with a = e^(−1/(τ f_s)). For Dudley’s 25 Hz corner (τ = 6.4 ms) at 48 kHz, a = e^(−1/307.2) = 0.99675. A 2 ms attack time constant gives a = 0.98964; a 30 ms release gives a = 0.99931. Using one coefficient when the input exceeds the output and another when it falls gives an asymmetric follower (Vol 3 §5.2) for the cost of one comparison per sample — a feature that costs a diode, a resistor and a compromise in analogue form.
7.1.4 What it costs
A sixteen-band vocoder with fourth-order analysis and synthesis filters needs 16 × 4 biquads × 5 multiplications = 320 multiplications per sample for the filters, plus a few per band for the followers and VCAs: roughly 15 million multiplications per second at 48 kHz. That is a small load for any current processor, which is why software vocoders offer 20, 40 or several hundred bands without strain, and why hardware vocoders since the 1990s have been DSP inside.
7.1.5 The FFT route
A different digital approach replaces the filter bank with a short-time Fourier transform (STFT). Take a block of N samples, multiply by a window, compute the FFT, and the result is N/2 complex values, one per frequency bin, spaced
Δf = f_s / N
apart and covering a time span of N / f_s. For N = 1,024 at f_s = 44.1 kHz: Δf = 43.1 Hz and the window is 23.2 ms long. Step forward by a hop of H samples (H = 256 gives 5.8 ms) and repeat.
A channel vocoder built on the FFT:
- computes the STFT of both modulator and carrier;
- for each analysis band, sums the modulator’s bin power |X[k]|² over the bins in that band, giving the band envelope for this frame (the envelope follower is now a frame-by-frame energy measurement plus optional smoothing across frames);
- multiplies the carrier’s bins in that band by the band gain;
- inverse-transforms and overlap-adds to produce the output.
The bins are spaced linearly; the bands should be spaced logarithmically (Vol 2 §4). So a low band contains very few bins and a high band very many.
For the MFOS band table at Δf = 43.1 Hz, the 154 Hz band (52 Hz wide) holds about 1.2 bins, while the 2,546 Hz band (568 Hz wide) holds about 13. One bin is not enough to represent a band’s shape; the lowest bands of an FFT vocoder are either very coarse or need a longer window. Doubling N to 2,048 halves Δf to 21.5 Hz but doubles the window to 46.4 ms, which smears consonants in time. This time–frequency trade-off is the same compromise as the analogue follower’s ripple-versus-speed trade (Vol 3 §4), in a different form: frequency resolution × window length = (f_s/N) × (N/f_s) = 1, whatever N is chosen.
7.1.6 Latency
An analogue vocoder’s delay is the group delay of its filters plus the lag of its envelope followers — a few milliseconds to a few tens. Dudley’s 1939 vocoder lagged the original by about 17 ms (Bell Laboratories Record, December 1939). An FFT vocoder adds at least one window length of buffering: 23 ms at N = 1,024 and 44.1 kHz. For a performer listening to themselves, 20–30 ms is noticeable; IIR-bank software vocoders avoid it.
7.1.7 Envelope by smoothing the spectrum
The FFT also allows a band-free approach: estimate the modulator’s spectral envelope directly by smoothing its magnitude spectrum across frequency (or by cepstral liftering, or by LPC, §3), then impose that smooth envelope on the carrier’s spectrum, bin by bin. This “spectral envelope transfer” is a vocoder with effectively as many bands as bins but without the harmonic-resolving problem of narrow bands (Vol 2 §1), because the smoothing step deliberately removes the modulator’s harmonic fine structure. The same operation, applied to a single voice whose pitch has been shifted, gives formant-preserving pitch shifting: shift the comb, then reapply the original envelope so the vowels do not turn into chipmunk or giant voices.
7.2 The phase vocoder
7.2.1 What Flanagan and Golden did
J. L. Flanagan and R. M. Golden’s “Phase Vocoder” (Bell System Technical Journal 45(9), November 1966, pp. 1493–1509) represented speech by short-time amplitude and phase spectra. Where Dudley’s channel vocoder kept only each band’s magnitude envelope and threw away phase and fine structure (Vol 1 §4.3), the phase vocoder keeps the phase of each band as well — and so can resynthesise the original nearly exactly. Julius O. Smith’s account reads the phase vocoder’s filter bank as a sliding short-time Fourier transform (CCRMA). The name records the lineage; the device is a different instrument. Its history is in The Vocoder in the Telephone Age.
7.2.2 Instantaneous frequency
The key quantity is the instantaneous frequency in each bin. Between two frames H samples apart, the phase of bin k advances by the measured Δφ. A pure tone exactly at the bin’s centre frequency ω_k = 2πk/N (radians per sample) would advance by ω_k H. The excess, wrapped into ±π, gives the tone’s deviation from the bin centre:
ω_inst = ω_k + princarg(Δφ − ω_k H) / H
where princarg wraps to (−π, π]. This is how a phase vocoder measures a partial’s frequency to a small fraction of a bin, far finer than Δf.
7.2.3 Time-stretch and pitch-shift
With amplitude and instantaneous frequency per bin, resynthesis can use a different hop H_s from the analysis hop H_a. Accumulating phase at the synthesis hop,
φ_out[m+1] = φ_out[m] + ω_inst × H_s,
produces the same partials, at the same frequencies, stretched in time by H_s / H_a. Pitch-shifting is a time-stretch followed by resampling: stretch by a factor α, then play back α times faster, and the duration returns while every frequency multiplies by α.
The known artefacts and their remedies, as listed in the program’s research brief: phase incoherence between neighbouring bins of one partial gives a “phasey,” reverberant smear, addressed by phase locking (Laroche & Dolson, 1999); transients smear across the window, addressed by transient detection (Röbel, 2003); and modified spectra may not correspond to any real signal, addressed by iterative reconstruction (Griffin & Lim, 1984).
7.2.4 Worked example: stretch and shift
Take N = 2,048 at 48 kHz (a 42.7 ms window, bins 23.4 Hz apart) with an analysis hop H_a = 512 samples (10.7 ms, a 4× overlap).
- Stretch to 150 % duration: use H_s = 1.5 × 512 = 768 samples. Every frame’s phases advance by ω_inst × 768 instead of × 512; the output has the same partials and lasts 1.5 times as long.
- Shift up a perfect fifth without changing duration: the ratio is α = 2^(7/12) = 1.4983. Stretch by α (H_s = 1.4983 × 512 ≈ 767 samples), then resample by α — play the stretched result back 1.4983 times faster, e.g. by reading it with a fractional-index interpolator. Duration returns to the original; every frequency is multiplied by 1.4983.
Applied to a voice, the shift moves everything up a fifth, including the formants: an /ɑ/ with F1 near 730 Hz comes out with F1 near 1,090 Hz, which is the region of F2 for the same vowel (Peterson & Barney averages), and the voice sounds smaller and thinner — the “chipmunk” effect. Formant-preserving pitch shift (§1.7) measures the spectral envelope before shifting and reapplies it afterwards, so the comb moves and the envelope stays. That operation is a vocoder in all but name: the modulator is the original voice’s envelope, the carrier is the shifted voice.
7.2.5 Why it does not sound like a vocoder
A phase vocoder run straight through reproduces its input. It makes “vocoder” sounds only if its spectrum is deliberately modified — magnitudes from one signal applied to the phases (frequencies) of another is cross-synthesis, which is exactly a channel vocoder with a great many bands. The musical “vocoder” and the studio “phase vocoder” diverged in the 1970s, and the shared name has confused users ever since.
7.3 Linear prediction
7.3.1 The model
Linear predictive coding (LPC) takes the source–filter model of Vol 1 §2 literally. It assumes the speech sample x[n] is well predicted by a weighted sum of the previous p samples,
x[n] ≈ Σ_{k=1..p} a_k x[n−k],
and that the prediction error e[n] = x[n] − Σ a_k x[n−k] is the source: a pulse train for voiced speech, noise for unvoiced. Rearranged, the speech is the source filtered by an all-pole filter
H(z) = G / (1 − Σ a_k z^(−k)) = G / A(z).
The poles of H(z) are the formants. The coefficients a_k for each frame (typically 20–30 ms) are found by minimising the error energy, which reduces to solving a Toeplitz system from the frame’s autocorrelation — efficiently, by the Levinson–Durbin recursion. A common rule of thumb for the order is about one pole pair per kilohertz of bandwidth plus a few for the glottal and radiation shape: at 8 kHz sampling, p ≈ 10. LPC-10, the US government 2,400 bit/s standard, used tenth-order analysis; so did the TI chip in the Speak & Spell (see The Vocoder in the Telephone Age).
The landmark paper is B. S. Atal and S. L. Hanauer, “Speech Analysis and Synthesis by Linear Prediction of the Speech Wave,” JASA 50(2B), August 1971 (scan).
7.3.2 LPC compared with the channel vocoder
Table 1 — 3.2 LPC compared with the channel vocoder
| Channel vocoder | LPC | |
|---|---|---|
| Envelope representation | N band energies | p filter coefficients |
| Frequency resolution of envelope | set by band count and spacing | continuous; resolves formant peaks precisely |
| Time resolution | follower speed | frame length (20–30 ms) |
| Source model | external carrier (music) or buzz/hiss (telephony) | pulse train or noise; or the actual residual |
| Bit rate (telephony) | 1.2–2.4 kbit/s historically (SIGSALY ~1.5; HY-2 2.4) | 2.4 kbit/s (LPC-10: 54 bits per 22.5 ms frame) |
For musical purposes, LPC is a channel vocoder with a better envelope: filter a carrier through 1/A(z) computed from a voice, and the carrier speaks with sharply resolved formants. Paul Lansky’s computer-music piece Six Fantasies on a Poem by Thomas Campion (1978–79) is the classic example of LPC resynthesis used as an artistic medium; it was made mainly with LPC and comb filters (Six Fantasies Machine, NTNU). LPC’s weakness for music is that the all-pole model fits voices well and many instruments poorly; a polyphonic carrier through an all-pole filter is fine, but a guitar as modulator gives an envelope the model was not built for.
7.3.3 Band-wise voicing: MBE
The multi-band excitation family of speech coders (IMBE, AMBE, AMBE+2), used in P25, DMR and D-STAR radios, makes the voiced/unvoiced decision of Vol 5 §5 separately in each frequency band rather than once for the whole spectrum: a voiced fricative such as z can then be harmonic in its low bands and noise-excited in its high bands at the same time (Wikipedia, “Multi-Band Excitation”). It is the most sophisticated form of the V/UV idea, and in its band structure the most direct descendant of Dudley’s channel vocoder still in daily use. The rates are in The Vocoder in the Telephone Age.
7.4 Neural vocoders
In speech synthesis since about 2016, “vocoder” names the stage that turns an acoustic description — typically a mel-spectrogram, a set of band energies on a perceptual frequency scale — into a waveform. DeepMind’s WaveNet (2016) generated raw audio one sample at a time at 16,000 samples per second and was deployed for Google Assistant voices in 2017 (Wikipedia: WaveNet). Google’s Lyra codec (2021) extracts features every 40 ms and rebuilds speech at the receiver with a generative model at 3 kbit/s; Google compared it to the parametric codec MELP (Google Research).
Structurally this is Dudley’s architecture again: an analyser that reduces speech to slowly varying band energies, and a synthesiser that rebuilds sound from them. A mel-spectrogram frame is a channel vocoder’s control-voltage vector sampled at a frame rate. What changed is the synthesiser: instead of a buzz and a hiss through matched filters, a trained network that has learned what speech waveforms consistent with those band energies look like — including the phase and fine structure that the channel vocoder discards.
7.5 “Robot voice,” taken apart
Since every one of these machines can make a “robot,” it helps to identify which ingredients produce the effect:
Table 2 — Since every one of these machines can make a "robot," it helps to identify which ingredients produce the effect
| Ingredient | Where it comes from | Removed by |
|---|---|---|
| Fixed or stepped pitch | carrier played on a keyboard or held constant | pitch-following carrier (Vol 5 §8) |
| Buzzy timbre | pulse or saw carrier | softer carrier, noise mix |
| Formants stepping between bands | few, widely spaced bands | more bands; LPC; spectral envelope |
| Missing or pitched consonants | carrier lacks hiss | bypass, V/UV (Vol 5) |
| Slurred transitions | slow followers, slew | faster followers |
| Harsh pitch-ripple roughness | fast followers | slower or higher-order smoothing (Vol 3 §4) |
A channel vocoder with a low pulse carrier and ten bands delivers the first four at once, which is why it is the canonical robot.
7.6 The cousins: what is not a vocoder
The research brief for The Vocoder in Music settles the commonest confusions with sources; the engineering differences are summarised here.
7.6.1 Talk box
An instrument’s sound — originally a guitar amplifier’s, often a synthesizer’s — is driven into a compression driver, piped up a plastic tube into the performer’s mouth, shaped acoustically by the mouth, and picked up by a microphone. The mouth is a real vocal tract with real formants; there is no analysis, no band, no electronics in the shaping. Electro-Harmonix described its Golden Throat as “not to be confused with a vocoder” because it physically pumps audio up a tube (via The Vocoder in Music brief). Ray Wilson uses the talk box in the MFOS documentation as the intuitive model of what a vocoder does “in a more round about way.” Celebrated examples (Peter Frampton; Roger Troutman of Zapp; “California Love”) are talk box records, not vocoder records.
Engineering consequence: a talk box has the full formant resolution of a real mouth and none of the vocoder’s band stepping, but the performer cannot sing normally at the same time, and the sound’s consonants are only those the mouth can make without the larynx.

7.6.2 Sonovox
Gilbert Wright’s Sonovox (1939) held small transducers against the performer’s throat; the played sound entered the vocal tract from outside and was shaped by mouthing words. Wendy Carlos’s description: “similar in resulting sound to a vocoder, but very different in execution and principle (physical, not electronic)” (wendycarlos.com). It is a talk box that enters through the neck rather than the mouth.
7.6.3 Auto-Tune
Antares Auto-Tune (1997) detects the pitch of a single voice and shifts it toward the nearest note of a chosen scale. With the retune speed set to zero, transitions between notes become instantaneous steps, producing the effect made famous by Cher’s “Believe” (1998). Wikipedia notes that Auto-Tune “operates on different principles from the vocoder or talk box” (Auto-Tune). There is one input, no carrier and no filter bank; the voice keeps its own timbre and formants. The robot quality comes entirely from the quantised pitch.
7.6.4 Harmonizer
A harmonizer creates pitch-shifted copies of a voice — often several, set by MIDI notes from a keyboard — and mixes them with the original. Some units, such as the DigiTech Vocalist family, include “vocoder” presets that shift formants to imitate a vocoder’s timbre “without the use of a synth” (MusicRadar, on Imogen Heap’s “Hide and Seek”). Technically a harmonizer is a pitch shifter, often a phase vocoder or a granular time-domain method, with formant correction. One input.
7.6.5 Formant filter
A bank of resonant filters set to vowel formants — fixed, switched or swept by an envelope or LFO — imposes a vowel on any input without analysing a voice. It is a vocoder’s synthesis half with the analysis half replaced by a preset, or equivalently a vocoder permanently frozen (Vol 5 §7.2).
7.6.6 Delay
Arthur Baker said the “electronic vocal vocoder sound” on Afrika Bambaataa’s “Planet Rock” (1982) came from a Lexicon PCM41 at “a really, really tight delay” (Sound On Sound, Classic Tracks). A very short delay mixed with the dry signal is a comb filter: notches at odd multiples of 1/(2τ). At τ = 1 ms the notches fall every 1 kHz from 500 Hz, giving a hollow, metallic colour; modulate τ and the comb sweeps. It shares nothing with a vocoder but the adjective “robotic.”
7.7 Choosing an implementation
For a builder or a sound designer, the families trade against each other as follows:
Table 3 — For a builder or a sound designer, the families trade against each other as follows
| Need | Best fit | Why |
|---|---|---|
| The sound of a particular vintage unit | the analogue circuit, or a model of it | band count, filter order, follower speed and VCA distortion are the character (Vols 2–4) |
| Low latency for live singing | analogue, or an IIR-bank plug-in | no window buffering; a few milliseconds of filter delay |
| Many bands, smooth formant motion | FFT or IIR with 20–40+ bands | channels cost almost nothing in software |
| Sharp formants from a voice | LPC or spectral-envelope transfer | resolves formant peaks rather than sampling them |
| Time-stretch, pitch-shift | phase vocoder | keeps phase; not a vocoder effect at all |
| Speech at the lowest bit rate | MBE, LPC-family codecs, neural codecs | the telephone branch; see The Vocoder in the Telephone Age |
| A voice-like sound from one input | talk box, formant filter, harmonizer | not vocoders, but often what is wanted |
The analogue designs on the bench in this program — MFOS, Elektor, VoIS, EM-26 — sit in the first two rows. Their particular sounds come from choices a software vocoder can copy exactly once the numbers are known: ten bands at a fifth apart with stagger-tuned fourth-order filters and fast three-pole followers (Elektor); twelve second-order bands with slow two-pole followers (MFOS); eighteen eight-pole third-octave bands with slew, V/UV and silence bridging (VoIS); ten staggered high-Q bands with a matched-pair multiplier and a built-in paraphonic string carrier (EM-26). Those numbers are collected in Vol 8 §9.
7.8 Summary
Table 4 — 8. Summary
| Machine | Inputs | What it measures | What it synthesises | Phase kept? |
|---|---|---|---|---|
| Channel vocoder (analogue or IIR) | 2 | band envelopes | carrier through matched bands | no |
| FFT channel vocoder | 2 | band energies from bins | carrier bins scaled | carrier’s |
| Phase vocoder | 1 (or 2 for cross-synthesis) | bin magnitude and phase | bins at new hop / pitch | yes |
| LPC | 1 (+ carrier for cross-synthesis) | all-pole filter + excitation | excitation through 1/A(z) | no |
| MBE (AMBE) | 1 | pitch, band envelopes, per-band V/UV | harmonics + noise per band | partly |
| Neural vocoder | 1 (features) | mel-band energies | learned waveform | yes (generated) |
| Talk box / Sonovox | 1 + mouth | nothing (acoustic) | the mouth shapes it | — |
| Auto-Tune | 1 | pitch | pitch-corrected voice | — |
| Harmonizer | 1 (+ MIDI) | pitch | shifted copies | — |
| Formant filter | 1 | nothing | fixed resonances | — |
Vol 8 returns to the analogue channel vocoder and designs one.
Comments (0)