Four microphones can pick one voice out of a room and ignore a loud TV. Sound reaches each microphone a fraction of a millisecond apart, and that gap is the whole trick.
Slide the TV toward the talker. First listen with one microphone, then add up four with delay-and-sum, then let MVDR aim a hole at the TV. Then we build every piece from zero: the delays, the spacing rule, the weights, the direction finders, and the robot that runs them.
You need a feel for waves (a tone has a pitch and a wavelength) and a little Python for the code. We build the rest from zero.
Built from primary sources, not slides: Knapp and Carter on time delay estimation, Capon’s minimum variance spectrum, Van Veen and Buckley’s beamforming tutorial, and the ODAS robot audition system. Full list in the Field Guide.
Illustrative scene at 2,000 Hz: four microphones in a line, 4 cm apart, 0° is straight ahead. The TV is 6 dB louder than the talker at every microphone, and each microphone adds its own hiss 25 dB below the talker. The shape is the exact response of each beamformer to a tone at 2,000 Hz, on a scale from 0 to −30 dB; MVDR uses the TV’s covariance (Chapter 5).
Chapter 0
See why a robot needs several microphones, and how a time gap between them lets software listen in one direction
A robot stands on a kitchen counter. You say, “Set a timer for ten minutes.” At that moment the TV plays a cooking show, the dishwasher hums, and your friend asks you a question across the room. The robot has to hear you and nobody else.
Your own ears solve this almost without effort. You turn toward the voice you want, and the others fade. Researchers call this the cocktail party problem: following one voice in a room full of voices. A robot with a single microphone cannot do it well. One microphone turns the whole room into one wiggling line, and the voice you want is tangled into that line with everything else.
Think of a camera with a single pixel. It tells you how bright the scene is, but not where the bright part sits. A single microphone is the same: it records how air pressure changes over time at one spot. It cannot tell you which direction a sound came from, because direction is not stored in one recording.
Add a second microphone a few centimetres away and something new appears. The voice reaches one microphone slightly before the other. That tiny gap in time carries the direction. A set of microphones used together is a microphone array, and the craft of combining their signals is beamforming.
Here is the whole trick before any maths. Suppose your voice reaches the left microphone 100 millionths of a second before the right one. Delay the left signal by exactly that gap and add the two. Your voice now lines up and the two copies reinforce each other. A sound from another direction has a different gap, so it does not line up, and its copies partly cancel.
The array has become a kind of listening beam: loud in the direction you chose, quieter elsewhere. You can point it by changing the delays, with no moving parts. The rest of this lesson makes that idea precise and then makes it robust enough for a real robot.
We need two measuring tools. The first is the decibel (dB). It compares two powers on a log scale: 10 dB means ten times the power, 3 dB means about twice, 6 dB about four times, and 20 dB a hundred times. A drop of 30 dB leaves one thousandth of the power. Decibels let us write huge ratios as small numbers.
The second is the signal-to-noise ratio (SNR): the power of the sound you want divided by the power of everything else, usually written in dB. At 0 dB the voice and the noise are equally loud. Speech recognisers (programs that turn audio into text) make many more errors as the SNR falls, so every technique in this lesson tries to raise it. When the “noise” is another talker or the TV, we call it interference.
There is a second benefit, and you can see it right now. Each microphone adds a little random hiss of its own. That hiss is different at every microphone, because each one is a separate piece of electronics. The voice, though, is the same in all of them once the delays are fixed.
Add N aligned signals and the voice adds up directly: its amplitude grows N times, so its power grows N² times. The hiss adds in a random way, so its power grows only N times. Divide by N² to keep the loudness fair, and the voice stays the same while the hiss power drops by a factor of N. In dB that gain is 10 log10(N), which is 6 dB for four microphones. Drag the number of microphones below and watch the noisy line calm down.
Top: one microphone hears the tone (warm line) buried in hiss. Bottom: the average of all microphones, already lined up on the tone. Drag the number of microphones.
Toy signal: a pure tone with independent random hiss on every microphone, the same random numbers on every visit. The SNR figures are measured on the traces you see. The theory value is 10 log10(N) dB; with only 200 samples the measured value wobbles around it.
The traces are real averages, not a drawing. With one microphone the SNR is about −3 dB, so the hiss is louder than the tone. At sixteen microphones it has climbed by about 12 dB. Notice what this does not do: it does not tell the voice from a second voice. Both would add up the same way. Telling voices apart needs the directional part of the trick, which starts in the next chapter.
A phone call has one person near one microphone. A robot lives in harder conditions, and each one shapes a design choice later in the lesson.
We follow one chain. First the physics of a delay, then where to place the microphones, then the beamformers from simple to clever, then the direction finders, and last the robot that runs them and the recogniser that reads the result.
Chapter 1
Turn a direction into a delay of a few hundred millionths of a second, and see why one pair of microphones cannot tell front from back
Clap your hands next to two phones lying on a table, one phone closer to you. Record both. Zoom in on the two recordings and you will find the same clap, a little earlier on the near phone. That small shift is the raw material of everything in this lesson. This chapter turns it into a formula.
Sound in air travels at about 343 metres per second at room temperature (20 °C). Light is nearly a million times faster. Because sound is slow, two microphones only 8 cm apart hear the same event at measurably different times, and an ordinary audio converter can measure the gap.
Sound speed rises by about 0.6 m/s for every degree Celsius. A robot working in a warm factory at 35 °C has c of about 352 m/s, a 2.6% change. We use c = 343 m/s through the lesson and say so when a number depends on it.
Take a talker who stands far away compared with the size of the array. A wave from a distant source is almost flat when it arrives. Engineers call this a plane wave, and the assumption is the far field. It means every microphone sees the same wave, just shifted. A common rule of thumb says the far field starts beyond 2D²/λ, where D is the array width and λ the wavelength (the length of one cycle of the sound in air). For a 12 cm array at 2,000 Hz, λ is 17 cm, so the far field starts beyond 0.17 m. A talker at arm’s length qualifies.
Now look at two microphones a distance d apart on a line. Measure the angle θ from straight ahead, from the line that stands perpendicular to the microphone line. This straight-ahead direction is called broadside. A wave arriving from broadside hits both microphones together. A wave from along the line itself (θ = 90°), called endfire, hits one microphone first and travels the full distance d to reach the other.
In between, the wave has to travel an extra d sin θ to reach the farther microphone. Divide that extra distance by the speed of sound and you have the delay.
Try it by hand. Take d = 8 cm and a talker at θ = 30°. Then τ = 0.08 × 0.5 / 343 = 0.0001166 s, which is 116.6 microseconds. An audio converter that takes 16,000 samples per second spaces its samples 62.5 microseconds apart, so this delay is 1.87 samples. The largest delay this pair can ever see is at endfire: 0.08 / 343 = 233 microseconds, or 3.73 samples.
Drag the talker around the pair below. Watch the yellow segment: it is the extra path, and the two pulses at the bottom show the shift it creates.
Top view: two microphones (purple) and wavefronts coming from the talker (warm arrow). The yellow bar is the extra distance. Bottom: what each microphone records.
Exact geometry for a far-field plane wave and c = 343 m/s. The pulses are illustrative (a 3,000 Hz burst); their shift is the computed delay. The 16 kHz sample count is delay times 16,000.
Direction finding runs the formula backwards. Measure τ, then θ = arcsin(c τ / d). Here a snag appears. Delays are measured in whole samples, so for d = 8 cm at 16 kHz only seven delays are possible: −3 to +3 samples. Whole-sample delays name only the angles 0°, 15.5°, 32.4° and 53.5° on each side, and the whole stretch from 53.5° to 90° squeezes into the last 0.73 sample. Near broadside, one sample of error moves the estimated angle by about 15°. That is too coarse for a robot that should turn its head to look at you.
Two fixes exist, and the lesson uses both. Estimate the delay to a fraction of a sample (Chapter 7 does this with a correlation peak), and use more than one pair of microphones so the errors average out (Chapter 8).
Notice what the formula depends on: sin θ. The angles 30° and 150° have the same sine, so a source ahead and to the right and a source behind and to the right produce the same delay. A single pair measures only a difference of distances, and many positions share one difference. This is the front-back ambiguity.
The failure shows up as a symptom: a robot with a straight line of microphones turns toward a person who stands behind it. A measurement confirms the cause: the delay for the true direction and for its mirror image is identical to the last digit. The fix is geometry: place the microphones so they do not all lie on one line. A ring or an L-shape breaks the tie, and Chapter 8 shows how.
Chapter 2
Find the spacing limit that stops an array from being fooled, and see the ghost beams that appear when you break it
Film a car wheel on a video and it sometimes seems to spin backwards. The camera takes a picture every 1/30 second, the spokes move too far between pictures, and your eye picks the wrong match. A microphone array has the same problem, only in space instead of time. This chapter finds the exact limit.
A recording takes a sample of air pressure every 62.5 microseconds. An array takes a sample of the sound wave at every microphone position. Time sampling needs at least two samples per cycle, or high pitches fold back into low ones. This folding is called aliasing. Space sampling needs at least two microphones per wavelength for the same reason. When it fails, the array is fooled about direction. We call that spatial aliasing.
Pick a pure tone of frequency f. Its wavelength is λ = c / f, so 2,000 Hz has λ = 343 / 2000 = 17.2 cm. Two neighbouring microphones d apart see the wave with a time gap τ = d sin θ / c. A time gap on a tone is the same as a phase shift, the fraction of a cycle by which one signal trails the other, written as an angle where a full cycle is 2π. The shift is Δφ = 2π f τ = 2π (d / λ) sin θ.
Here is the catch. A microphone cannot tell Δφ from Δφ + 2π, because a tone that is one full cycle late looks exactly like a tone on time. So two directions θ1 and θ2 look the same whenever (d / λ)(sin θ1 − sin θ2) is a whole number. Sine only ranges from −1 to 1, so the largest possible difference between two sines is 2. If d / λ is below 1/2, the gap between sines needed for a whole number is more than 2, and no two directions in front can collide.
This is the half-wavelength rule found in array texts and in microphone application notes; one open MEMS-array paper states it as d < λmin/2 with λmin = c / fmax (see the Field Guide). Work it for a robot head. With d = 4 cm, fmax = 343 / (2 × 0.04) = 4,287 Hz. With d = 5 cm it is 3,430 Hz. To keep all of speech up to 8,000 Hz you would need d = 2.14 cm.
The half-wavelength rule is the safe rule: it holds for every steering direction. If you only steer near broadside, you can do better. A beam aimed at θ0 grows a ghost copy of itself, called a grating lobe, when (d / λ)|sin θ − sin θ0| reaches 1 for some θ. The largest possible difference is 1 + |sin θ0|, so ghosts stay away while d / λ < 1 / (1 + |sin θ0|). Steered straight ahead the limit is f = c / d. Steered to endfire it falls to c / (2d). Move the sliders below and watch the red ghost appear.
The teal shape is the response of a four-microphone delay-and-sum beam to a tone. A red dot marks any ghost lobe. Raise the frequency, widen the spacing, or steer sideways.
Exact response of a four-microphone delay-and-sum beam on a scale from 0 to −30 dB. Ghost angles come from sin θ = sin θ0 ± λ/d and appear in front/back pairs because a line of microphones cannot tell front from back.
A small array has the opposite trouble at low pitch. At 300 Hz, λ is 1.14 m. Microphones 4 cm apart see a phase shift of at most 2π × 0.04 / 1.14 = 0.22 radians, about 13°. The tiny shift hides under microphone noise and under small differences between microphones, so the array cannot separate directions at low pitch. Spacing is always a compromise: close enough to avoid ghosts at 8 kHz, wide enough to see anything at 300 Hz.
A linear array puts microphones on a line. It is simple, steers well within ±60° of broadside, and has the front-back mirror from Chapter 1. A circular array puts them around a ring, which covers all directions and has no mirror problem for a source in the plane. Many smart speakers use a ring, and robot heads often do too. The half-wavelength rule applies to the spacing between neighbours around the ring.
The failure here begins as a symptom: the robot hears a clear voice from the right but its beam also lights up a second direction on the left, and the recogniser transcribes a TV. The measurement is a beam pattern sweep with a test tone above the alias frequency; two main lobes appear. The fix is one of three: move the microphones closer, low-pass filter the signal below the alias frequency before beamforming, or accept ghosts at the highest bands and let a later stage choose the true one.
Chapter 3
Steer a listening beam by delaying and adding, then read its width, its side lobes and its hiss gain
Imagine four drummers in a row, and you want their beats to land on your ear at the same instant. If the drummer farthest from you starts first and the nearest starts last, the beats arrive together and sound four times as strong. Beats that start at the wrong times arrive scattered and sound weak. This chapter is that idea for sound waves.
Delay-and-sum is the oldest beamformer. Pick a direction θ0 to listen to. From Chapter 1, you know the delay each microphone sees for a wave from that direction. Shift every microphone signal by that delay so the wave from θ0 lines up, then add the signals and divide by N. A wave from θ0 comes out at full strength. A wave from elsewhere comes out smaller, because its copies are out of step and partly cancel.
For a pure tone, a shift in time is a phase shift, so each microphone signal gets multiplied by a complex number. Write the N signals as a vector x. Write the multipliers as a vector w, called the weights. The output is one number per moment:
Check the claim. A wave from θ0 gives x = a(θ0) s, where s is the wave. Then y = (1/N) aH a s = (1/N) · N · s = s. The talker passes with gain exactly 1. This is the distortionless condition, and it returns in Chapter 5.
How does the beamformer treat a wave from some other direction θ? Replace a(θ0) with a(θ) in the sum. The power gain is the beam pattern, B(θ) = |wH a(θ)|2. For evenly spaced microphones it has a clean form, with ψ = 2π (d/λ)(sin θ − sin θ0):
B(θ) = [ sin(Nψ/2) / (N sin(ψ/2)) ]2
At θ = θ0 we get ψ = 0 and B = 1. The first null (a direction of zero response) sits where Nψ/2 = π, that is sin θ − sin θ0 = λ / (N d). Two lessons follow. A longer array (bigger N d) gives a narrower beam. A shorter wavelength (higher pitch) also gives a narrower beam.
Work a robot example: N = 4, d = 4 cm, steered straight ahead. At 4,000 Hz, λ = 8.6 cm, and the first null is at sin θ = 0.0858 / 0.16 = 0.536, which is θ = 32.4°. Fine. At 2,000 Hz, λ = 17.2 cm, and the formula asks for sin θ = 1.07. That is impossible, so there is no null at all. The response simply declines to about −22 dB at endfire. At 500 Hz the array is only 0.17 wavelengths long, and the response barely changes with direction. The beam is a gentle bump.
The teal shape is how loudly the array hears each direction. Change the number of microphones, the spacing or the pitch, and watch the width. Try the taper.
Exact response of the weights shown. The taper gives the outer microphones less weight (Hann shape), with the weights re-scaled to add up to 1 so the talker still passes at gain 1. Noise gain is the factor by which uncorrelated microphone hiss is reduced, 1 / (sum of squared weights).
Look at the read-out as you slide. Tapering lowers the side lobes (the small bumps beside the main beam) but widens the main beam and costs some hiss reduction. Every beamformer trades width, side lobes and hiss against each other.
Chapter 0 showed that averaging N aligned microphones lowers uncorrelated hiss by 10 log10 N dB. Written with weights, that figure is the white noise gain, WNG = |wH a|2 / (wH w). For equal weights it equals N. It limits what a beamformer can do to the hiss, and later it warns us about overeager designs.
The failure that matters on a robot starts as a symptom: the robot understands a high voice but a low TV drone leaks through. The measurement is the width in the device: at 500 Hz the beam of a 12 cm array covers the whole front half-plane. The cure is not to add a few more microphones, but to change what the weights are designed for. That is the next two chapters.
Chapter 4
Delay a signal by a fraction of a sample, see what rounding costs, and give each frequency its own weights
You have a recording at 16,000 samples per second, and the steering rule asks you to delay microphone 3 by 1.87 samples. A recording has samples at whole positions only. There is no sample number 1.87. So how does a robot delay a signal by a piece of a sample? This chapter shows the cheap answer, why it hurts, and the proper answer.
The simplest delay-and-sum code rounds each delay to the nearest whole sample. That shifts the signal by 2 samples when 1.87 was needed. The error is at most half a sample, which is 31.25 microseconds at 16 kHz. It sounds small. But for a tone of frequency f, a timing error e is a phase error of 360 × f × e degrees. At 1,000 Hz the worst case is 11°. At 4,000 Hz it is 45°. At 8,000 Hz it is 90°, a quarter of a cycle.
Phase errors stop the signals adding up at full strength. Two copies that are 90° apart add to only 71% of the full amplitude, a loss of 3 dB. With four microphones the errors partly average out, so the loss toward the talker is modest, as the device below shows. The real damage is in the nulls. To cancel a TV by 30 dB, the leftover amplitude must be about 3% of the original, and that needs a phase accuracy near 1.8°. At 2,500 Hz, 1.8° is 2 microseconds, or 0.03 of a sample. Rounding to whole samples cannot reach that, so any design that depends on deep nulls (Chapter 5) needs exact delays.
Three ways give a delay of a fraction of a sample.
The device below measures the damage. It takes four microphones 5 cm apart, steers to the angle you choose, and compares the array gain toward the talker with rounded delays against exact delays.
The flat teal line is exact delays. The yellow line is delays rounded to whole samples. Choose a sample rate, steer sideways, and slide the tone to a frequency.
Exact computation for four microphones 5 cm apart, delays measured from the first microphone. Gain is the amplitude of the sum of the four rounded-delay phasors divided by 4, in dB; exact delays give 0 dB by construction. The horizontal axis stops at half the sample rate, or at 8,000 Hz.
At 16 kHz and 30°, the delays from the first microphone are 0, 1.17, 2.33 and 3.50 samples (d sin θ fs / c with d = 5 cm). Whole-sample rounding gives 0, 1, 2 and 3. The errors are 0, −0.17, −0.33 and −0.50 samples. Slide the tone: the loss toward the talker grows with pitch, from 0.02 dB at 1,000 Hz to 0.4 dB at 4,000 Hz and about 1.2 dB at 7,000 Hz. At 48 kHz each error is three times smaller, and the loss at 4,000 Hz falls to 0.07 dB.
Once you work in the frequency domain, a bigger idea opens up. Delay-and-sum applies the same kind of weight to every frequency, a pure phase shift of equal size. Filter-and-sum lets each microphone have its own filter, so the weights may differ at every frequency. In the frequency domain the output at bin k is
Y[t, k] = wkH X[t, k]
where t is the frame number, k the frequency bin, X[t, k] the list of M microphone values and wk the weights for that bin. Delay-and-sum is the special case wk = ak / M. MVDR in the next chapter picks a different wk for every bin from the noise it sees.
For a four-microphone robot at 16 kHz with a 512-sample frame and a hop of 256, the microphone signals are an array of shape [M, samples] = [4, 16000] per second. The STFT (short-time Fourier transform, a sliding window of Fourier transforms; see our STFT lesson) turns this into X of shape [M, T, F] = [4, 62, 257] complex numbers per second, because 257 bins cover 0 to 8 kHz in 31.25 Hz steps. The weights have shape [F, M]. The output Y has shape [T, F], one channel. An inverse STFT with overlap-add returns the waveform.
pythonimport numpy as np def steering(freqs, mic_x, theta, c=343.0): # phase shifts of a plane wave from angle theta: shape (F, M) tau = mic_x * np.sin(theta) / c # (M,) seconds return np.exp(-2j * np.pi * freqs[:, None] * tau[None, :]) def das_stft(X, freqs, mic_x, theta): # X: (M, T, F) complex STFT of the microphone signals A = steering(freqs, mic_x, theta) # (F, M) W = A / A.shape[1] # delay-and-sum weights, (F, M) return np.einsum('fm,mtf->tf', W.conj(), X) # Y: (T, F)
One condition hides inside this recipe. A phase multiplication equals a delay only if the frame is much longer than the delays. Here the longest delay for a 10 cm array is 4.7 samples and the frame holds 512, so the approximation is excellent. The same condition fails later, in Chapter 9, when a room’s echoes stretch to thousands of samples.
Chapter 5
Fix the talker at gain 1, let the weights shrink everything else, and see an aimed hole beat a wide beam
Back in the kitchen, the TV sits to the right of the robot and always stays there. Delay-and-sum aims a beam at you, but its beam is wide and its side lobes still let some of the TV through. Now ask a sharper question. If you know what the TV looks like to the four microphones, can you choose weights that silence it, and still pass your voice untouched?
Yes. The recipe is called MVDR, and it is the workhorse of modern array processing. To build it we need one new object: the covariance matrix.
Take the microphone signals at one frequency as a list x of N complex numbers. The covariance matrix R is an N × N table that records how each pair of microphones moves together: R = E[x xH], where E means “average over time”. The diagonal entries are the power at each microphone. An off-diagonal entry says how similar microphone i and microphone j are, including their phase offset.
Why does this help? A TV in one place makes all four microphones copy each other with the fixed phase offsets of its direction. That shows up as strong, structured off-diagonal entries. Random hiss shows up only on the diagonal. So R is a snapshot of the noise’s spatial fingerprint. For one interferer of power P in direction θi plus hiss of power σ² on each microphone:
R = σ² I + P ai aiH
where ai is the steering vector toward the interferer and I is the identity matrix (ones on the diagonal, zeros elsewhere).
MVDR stands for minimum variance distortionless response. Capon proposed it in 1969 for seismic arrays. The rule has two parts, both plain.
Since the talker is held fixed, shrinking the output power can only come from removing noise and interference. The weights discover on their own where the interference is and turn their response toward it down.
Where does the formula come from? Use a Lagrange multiplier (a standard way to minimise under a constraint). Form L = wH R w − λ(wH a − 1). Setting its slope with respect to w to zero gives R w = λ a, so w = λ R−1 a. The constraint wH a = 1 then fixes λ = 1 / (aH R−1 a), which is the formula.
Let the talker be straight ahead, so a = [1, 1]. Let the TV create the pattern ai = [1, j], a quarter cycle apart between the microphones. Give the TV a power of 100 and the hiss a power of 1 per microphone. Then R = I + 100 ai aiH = [[101, −100j], [100j, 101]].
The determinant is 101² − 100² = 201, so R−1 = (1/201) [[101, 100j], [−100j, 101]]. Multiply by a: R−1 a = (1/201) [101 + 100j, 101 − 100j]. The denominator is aH R−1 a = 202/201 = 1.005. So w = [0.500 + 0.495j, 0.500 − 0.495j].
Now check. Toward the talker, wH a = 1, as required. Toward the TV, |wH ai|² = 0.000049, which is −43 dB, so the TV leaks with power 100 × 0.000049 = 0.0049. Delay-and-sum (w = [0.5, 0.5]) would leak 100 × 0.5 = 50. The price is hiss: the hiss power at the output rises from 0.5 to 0.99, since the weights are bigger. The output signal-to-interference-plus-noise ratio goes from 1 / 50.5 = −17 dB to 1 / 0.995 = 0 dB. That is a 17 dB gain from a two-microphone array.
The talker is straight ahead. The dotted outline is delay-and-sum. The teal shape is MVDR, built from the interferer’s covariance. Move the interferer and change its loudness.
Four microphones 4 cm apart. The talker has power 1 at every microphone and the hiss is 0.01 (−20 dB). Interferer power is measured against the hiss. The output ratio is the talker’s power divided by the interference plus hiss at the output. Both patterns are exact for the stated covariance.
Slide the interferer toward the talker. The null follows, but it narrows, the weights grow, and the hiss gain climbs. When the TV is only a few degrees from the talker at low pitch, MVDR cannot separate them without making huge weights. No design can: the array simply cannot tell two nearby directions apart.
MVDR needs the covariance R of the unwanted sound, learned from what the array has heard. It needs the talker’s steering vector a. It needs one matrix inverse per frequency bin, small for four microphones and cheap. In return it uses the same N microphones to make a pattern that bends around the interference, instead of the fixed shape of delay-and-sum. The symptom of using it badly, the measurement that shows it, and the fix are the subject of the next chapter.
Chapter 6
Watch MVDR cancel the talker when the aim is off, and tame it with a pinch of added hiss
You build the MVDR beamformer from Chapter 5 and test it in the lab. It silences the TV beautifully. Then you hand the robot to a colleague, who talks to it from a slightly different spot. The TV is still gone, but so is the colleague. The robot hears a hollow, thin voice, or nothing at all. This chapter explains why, and how to fix it.
In Chapter 5 we gave MVDR a covariance R that held only noise. In a real robot R is estimated from the microphone signals while someone is talking, so it also contains the talker. MVDR then follows its rule faithfully: keep gain 1 toward the direction it was told, and make the output power as small as possible. If the talker is really 4° away from where the robot looks, the talker is not in the “gain 1” direction. To MVDR the talker is just another loud source to reduce. So it cuts the talker. Engineers call this signal cancellation.
Two things make it worse. A louder talker adds more power to R, so MVDR works harder to remove it. And a narrow null is exactly the shape that a small aiming error can step into. A tight null is a feature for the TV and a trap for the talker.
The numbers show how sharp the trap is. In the device’s setup the talker sits 4° off the aim. Plain MVDR passes a wave from the aimed direction with gain 1, but a wave from the talker’s true direction only 4° away comes through at −23.3 dB. The weights have grown large to make that notch, so the hiss at the output is also 61 times its single-microphone value. Add loading of 10 times the hiss and the talker comes through at −7.2 dB instead, while the TV still drops to −26.9 dB.
The cleanest test is to sweep the aiming error and measure the output ratio. Use the true talker response in the numerator and everything else in the denominator. The device below does this for the Chapter 5 array: four microphones 4 cm apart, 2,000 Hz, a TV at 50° with 30 dB more power than the hiss, a talker with 30 dB more power than the hiss.
Each curve is the output ratio as the talker drifts away from the direction the robot is looking. Raise the loading and watch the red curve’s collapse turn into a gentle slope.
Exact computation. The covariance R holds the hiss (0.01 per microphone), the TV (50°) and the talker at the true direction; the weights are built from R plus the loading and the assumed direction 0°. Talker and TV power are in dB above the hiss. Loading is shown as a multiple of the hiss power.
Read the curves. Delay-and-sum is steady but weak: the TV at 50° still leaks through its side lobe. Plain MVDR is superb at zero error and then falls off a cliff within two degrees. A louder talker moves the cliff closer. Neither behaviour is a bug. It is exactly what the minimum-power rule asks for.
The most common repair is diagonal loading: add a small constant ε to the diagonal of R before the inverse, so the weights come from (R + εI)−1 a. It is the same as pretending that every microphone has a little extra hiss. The effect is easy to see at the two extremes. With ε = 0 you get plain MVDR. With ε much bigger than every entry of R, the matrix is nearly εI, its inverse is a constant, and the weights become a / N, which is delay-and-sum. Loading is a knob that slides between a sharp, risky design and a blunt, safe one.
It also protects against other imperfect inputs: a steering vector that differs from a perfect plane wave (the robot’s head blocks some sound), microphones whose gains differ by half a decibel, and a covariance estimated from too few frames (Chapter 10). A practical rule from the literature is to set ε from the diagonal itself, for example a few percent of the average microphone power. Another is to require a minimum white noise gain, the hiss-reduction number from Chapter 3, and raise ε until it is met.
The price is real. With heavy loading the null shrinks and the TV leaks again. The device shows it: at 30 dB talker power and 2° error, plain MVDR scores −5.4 dB, loading of 10 times the hiss scores 15 dB, and loading of 100 times the hiss scores 26 dB, but at zero error the heavily loaded design gives up about 1.4 dB of the best case.
Chapter 7
Measure the delay between two microphones by sliding and comparing, and keep only the phase so echoes cannot hide the peak
Every beamformer so far needed to be told where the talker is. A robot has to find out for itself. The simplest question to ask is small: for one pair of microphones, how late is the sound at the second one? That lateness is the time difference of arrival (TDOA). From Chapter 1, you know that one delay is one angle.
To find a delay, take the signal from microphone 1 and slide it against the signal from microphone 2. At each slide amount, multiply the two together sample by sample and add up the products. When the slide matches the true delay, the two signals line up and the sum is largest. The sum as a function of the slide amount is the cross-correlation. The slide where it peaks is the delay estimate.
A quick check with a click. Microphone 1 hears a click at sample 100. Microphone 2 hears it at sample 103. Slide microphone 1 by 3 samples, and the clicks overlap: the sum peaks at a lag of 3. The delay is 3 samples, or 187.5 microseconds at 16 kHz.
Two things go wrong with real speech in a real room. First, speech is not flat: low frequencies carry most of the power. A signal that is mostly low-pitched is smooth, so its correlation peak is a broad hill with no sharp top. Second, a room has walls. Sound that bounces arrives later, and it reaches the microphones through different paths. The correlation then has extra hills at the echo delays, and a strong echo can be higher than the true peak.
The fix comes from the frequency domain. Take the Fourier transform of each signal. If microphone 2 is microphone 1 delayed by τ, then at every frequency f the two spectra differ by a phase of e−j2πfτ. The delay is stored in the phase, as a straight line that tilts more at high f. The loudness of each frequency tells you about the talker’s voice, not about the delay.
The phase transform (PHAT) throws the loudness away. Form the cross-spectrum G(f) = X2(f) X1*(f), where * flips the sign of the phase. Divide by its own size, so every frequency has length 1 and only its phase is left. Transform back to time. The result is GCC-PHAT, the generalised cross-correlation with the phase transform. Knapp and Carter introduced the generalised form in 1976 as a family of weightings; PHAT is the member that whitens the spectrum.
With a perfect delay, G/|G| equals e−j2πfτ at every frequency, and the transform back is a single spike at τ. A sharp spike is much easier to find than a broad hill, and echoes only add small bumps.
Take a frame of 1,024 samples from each microphone at 16 kHz, which is 64 ms. Each real FFT gives 513 complex numbers. The cross-spectrum G has shape [513]. After dividing by |G| it still has shape [513]. To read the peak to a fraction of a sample, zero-pad the inverse transform to 8,192 points, which spaces the output 1/8 of a sample apart. Read only the window of lags the geometry allows: for microphones 20 cm apart, ±9.3 samples. The peak lag becomes an angle with θ = arcsin(c · lag / (fs · d)). A lag of 3.4 samples gives sin θ = 343 × 3.4 / (16000 × 0.2) = 0.364, which is θ = 21.4°.
Two microphones 20 cm apart hear a speech-like sound. Echoes reach microphone 2 as well. The dashed line is the true delay. Each curve is a correlation score; the dot is its highest peak.
Illustrative toy room, computed live: a random speech-like spectrum (strong low pitch, 100 to 7,000 Hz), 1,024-sample frames at 16 kHz, microphones 20 cm apart. Two echoes arrive 9.3 and 22.2 samples after the direct sound, only at microphone 2; at 100% they are 1.21 and 0.77 times the direct sound, a room past its critical distance. A peak counts as right when it falls within 0.3 sample of the truth.
With the default settings the plain correlation settles on the wrong place, while GCC-PHAT stays on the true spike. Turn the echo to 0% and both agree. Press Score 20 draws at 100% echo and 20 dB: in our run plain correlation was right in 0 of 20 draws and GCC-PHAT in 20 of 20.
PHAT is not free. Because every frequency votes equally, a bin that holds only noise gets the same vote as a bin that holds speech. Drag the signal-to-noise down to 0 dB and the advantage shrinks: with the echo at 100%, GCC-PHAT was right in 8 of 20 draws and plain correlation in 3. With no echo at all, both were right in only 9 of 20, because noise-only bins now vote as loudly as speech. The measurement is the score button. The fixes are common practice: use only the 300 to 4,000 Hz band where speech lives, weight each bin by how clean it is (a weighted PHAT), or average over several frames before picking the peak.
Chapter 8
Combine every microphone pair into one map of where sound comes from, and see the mirror vanish when the microphones leave the line
One pair of microphones gives one delay, and one delay gives a mirrored angle. A robot head with four microphones has six pairs. Each pair has its own GCC-PHAT curve, and each curve votes for the directions that would produce its delay. The direction that collects the most votes wins. That is steered response power (SRP): aim a virtual beam at every direction and ask which one is loudest.
Pick a candidate direction φ, measured around the robot with 0° straight ahead. For this direction, geometry tells you the delay every microphone pair should see. Look up each pair’s GCC-PHAT score at that delay and add the scores. Do the same for every φ on a grid, say every 2°, and you have a map of “how much evidence points this way”. The highest peak is the estimate.
This is the same thing as steering a delay-and-sum beam at every direction and measuring its output power, except that the cross-spectra are whitened by PHAT first. DiBiase’s 2000 thesis on talker localisation combined the two ideas as SRP-PHAT and compared it with plain SRP and with pairwise GCC-PHAT in reverberant rooms. In symbols, with ωk the frequency of bin k:
Put M microphones on a circle of radius r. Microphone m sits at angle αm. A far-field wave from direction φ reaches microphone m at a time tm = −(r / c) cos(φ − αm) relative to the centre, which is earlier for microphones on the side facing the source. The pair delay is Δτij(φ) = ti − tj. For r = 5 cm the largest pair delay is 2r / c = 292 microseconds, about 4.7 samples at 16 kHz.
A worked pair: imagine two microphones at opposite ends of the left-right diameter, so they are 10 cm apart. A talker at φ = 70° makes a delay of 0.10 × sin 70° / 343 = 274 microseconds, which is 4.38 samples. A talker at 110°, the mirror, makes the same delay. A second pair across the front-back diameter sees cos φ instead of sin φ, and gives 100 microseconds for 70° but −100 for 110°. Together the two pairs tell the mirror images apart. That is the whole reason a ring beats a line.
The number of pairs grows fast: 2 microphones give 1 pair, 4 give 6, 6 give 15, since M(M−1)/2. The cost per frame is pairs × bins × candidate directions. With 6 pairs, 100 bins (300 Hz to 6.5 kHz at 62.5 Hz spacing) and 180 directions, that is 108,000 complex multiplications per frame, or about 10.8 million per second at 100 frames per second. That runs on a small embedded processor. The open ODAS robot-audition system, built at Université de Sherbrooke, does SRP-PHAT localisation in 3-D on low-cost embedded boards and trims the work further by correlating only the microphone pairs that have a direct sound path to each other (for an 8-microphone closed array it uses 20 of the 28 pairs, a 29% cut in correlation work).
The robot sits at the centre with its microphone ring (purple dots). The teal shape is the evidence map P(φ). The green dot is the estimate. Move the talker, add a TV, change the number of microphones.
Illustrative scene, computed live: ring radius 5 cm, speech-like random spectrum, bins from 312 to 6,500 Hz in 256-point frames, microphone hiss 10 dB below the talker, TV level measured against the talker. Directions run clockwise from straight ahead. A hit means the peak lands within 6° of the talker.
With two microphones the map shows two equal peaks, one at the talker and one at its mirror across the line through the microphones. Four or six break the tie. Raise the TV level to +6 dB and you will see the map grow a second hill at the TV, and sometimes the wrong peak wins. Averaging more frames smooths random noise but cannot move a loud, steady TV out of the way.
Symptom: the robot turns toward the TV when a person speaks softly. Measurement: the map has two peaks and the TV peak is higher. Two fixes come together. Look for several peaks instead of one, and hand each to the beamformer as a separate source. Let the recogniser, or a voice detector, decide which one is speech. Second symptom: the estimate jumps from frame to frame. Measurement: averaging 1 frame versus 20 changes the hit rate in the score button. The fix is to average, and then to track over time, which is the next chapter.
Chapter 9
Smooth and gate noisy direction estimates, correct for the robot’s own head turns, and see the pipeline end to end
A person walks across the kitchen while the robot turns its head to follow. Every 50 milliseconds the SRP-PHAT map from Chapter 8 delivers a new angle. Some are good. One is 70° wrong because the dishwasher clanked. One jumps because the robot’s own head just turned. If the beamformer chased every estimate, the beam would shake and the voice would warble. A robot needs a memory: a talker that was at 20° a moment ago is probably near 20° now.
The array is bolted to the robot, so it turns when the head turns. A talker who stands perfectly still appears to swing across the array’s view. Suppose the talker is at 20° in the room and the head turns 30° to the left. The array now sees the talker at 20° − (−30°) = 50°. Every estimate of the robot-frame angle moves by exactly the head turn. The fix is plain. Read the head angle from the joint encoders or an inertial sensor, add it back, and track the world-frame angle. Then a still talker stays still on the tracker’s plot, and the beam is steered by subtracting the head angle again.
Angles also wrap: 179° and −179° are 2° apart, not 358°. Compare angles with the shortest signed difference, ((a − b + 540) mod 360) − 180, or the tracker will whip around the back of the robot.
Let x̂ be the current estimate and z the new measurement. The update x̂ ← x̂ + α(z − x̂) moves the estimate a fraction α of the way toward the measurement. This is an exponential smoothing filter. Set α = 1 and the estimate is the raw measurement. Set α = 0.1 and each new measurement only moves it a tenth. It is the same idea as the gain of a Kalman filter, a trust slider between prediction and measurement; our Kalman filter lesson derives how to set it optimally.
Smoothing has a price: delay. If the talker moves at a steady rate of r degrees per frame, the filter trails the truth by r × (1 − α) / α degrees. A person walking at 1 m/s past a robot 2 m away sweeps about 28° per second. With 50 ms frames that is 1.4° per frame. At α = 0.2 the lag is 1.4 × 4 = 5.7°. At α = 0.05 it is 1.4 × 19 = 27°, which would put the beam on the wrong shoulder.
A single wild measurement, say 70° off, drags a smoothing filter by α × 70°. A gate prevents this: if a measurement lands more than 25° from the estimate, ignore it. A real new talker, though, will keep producing far-away measurements. So count the rejections in a row, and when three in a row agree that something moved, accept the new angle and jump. Gating is how a tracker tells a clank from a person who has started speaking from the other side of the room. Try both below.
The warm line is the true angle of a talker who walks back and forth. The blue dots are the noisy estimates from the direction finder. The teal line is the tracker. Change the trust, the noise and the outliers.
Illustrative: 100 frames of 50 ms (5 seconds), true angle 35° × sin(one swing), peak speed 44° per second. Noise is Gaussian with the standard deviation shown; an outlier replaces a measurement with a random angle between −90° and 90°. The errors are root-mean-square over the frames, measured against the true path.
With the default settings, the raw estimates are off by about 18° because of the outliers. The tracker without a gate cuts that to about 10°, but each wild point still pulls it. Switch the gate on and the error falls to about 6°. Then push α down to 0.05 and watch the lag appear: the teal line follows the shape but late, and the error climbs back to about 12°. Every robot tracker sits somewhere on this dial.
The tracker is one stage in the pipeline that runs every hop. Shapes below assume 4 microphones, 16 kHz, a 512-sample frame and a hop of 256 (16 ms).
| Stage | Input | Output | Notes |
|---|---|---|---|
| Capture | analog sound | [4, 256] samples per hop | 16 ms of new audio per hop |
| Echo cancel | [4, 256] plus the robot’s own playback | [4, 256] | removes the robot’s own voice using the known playback signal |
| STFT | [4, 512] window | [4, 257] complex | one frame; 31.25 Hz per bin |
| Localise | [4, 257] | angle map [180] | SRP-PHAT, Chapter 8 |
| Track | angle, head yaw | world angle | gate and smooth, this chapter |
| Beamform | [4, 257], weights [257, 4] | [257] | Chapters 3 to 6 |
| Inverse STFT | [257] | [256] samples | overlap-add into the recogniser |
Latency adds up. The beamformer cannot answer until a full 512-sample frame has arrived (32 ms). The hop adds up to 16 ms of waiting for the next one. Smoothing in the tracker adds the lag you just measured. A recogniser that works in chunks adds its own. A robot that wants to answer within a natural turn gap of a few hundred milliseconds has to count every one of these in a budget.
Two sources of noise belong to the robot itself. Its own loudspeaker leaks into its microphones. Since the robot knows what it is playing, an echo canceller can subtract it before localisation. Its motors and fans, called ego-noise, sit at fixed positions next to the array and add steady structure to R, which MVDR can null (Chapter 10).
Chapter 10
Learn the noise covariance from labelled time-frequency cells, count how many frames it needs, and hand the clean channel to a recogniser
Chapters 5 and 6 left one question open. MVDR needs the covariance of the noise, but a robot never gets a clean recording of noise while the talker is silent and then a clean recording of the talker alone. The two are always mixed. This chapter shows how a robot builds the covariance anyway, how many frames it needs, and how the result reaches the speech recogniser.
For one frequency, collect K snapshots: each is the list of N microphone values in one frame, x1 to xK. The sample covariance is the average of x xH over the snapshots, R̂ = (1/K) ∑ xk xkH. It is the Chapter 5 object, estimated from data instead of known. With few snapshots it is noisy, and with fewer than N snapshots it cannot even be inverted. That is another reason for diagonal loading.
Which snapshots go in? If we average only frames and bins where the talker is silent, R̂ is a noise covariance. If the talker leaks in, the weights learn to cancel the talker, which is Chapter 6’s problem again. So the whole game is deciding, for each tiny cell of time and frequency, whether it holds speech or noise.
A time-frequency mask is a table the same shape as the STFT: for each frame t and bin f, a number m between 0 and 1 saying how much of that cell is speech. In 2016, Heymann and colleagues showed that a small neural network (a bidirectional recurrent network) can predict the mask from the magnitude of a single microphone, and that masks computed this way give covariances good enough to drive a beamformer. The network never touches the phase; the beamformer does that part. Weighted averages then give the two covariances for each bin f:
Φs(f) = ∑t mt,f x xH / ∑t mt,f Φn(f) = ∑t (1 − mt,f) x xH / ∑t (1 − mt,f)
A neat form of MVDR then needs no steering vector at all. With a reference microphone r (a one-hot vector er), the weights are w = Φn−1 Φs er / tr(Φn−1 Φs). Why does it work? For one talker, Φs is close to P a aH, so Φn−1 Φs er points along Φn−1 a, the MVDR direction, and the trace rescales it. The talker’s steering vector comes out of the data. This form is the one the torchaudio library calls SoudenMVDR (after Souden and colleagues).
For a four-microphone robot and 257 bins, X has shape [M, T, F] = [4, T, 257]. The network turns one channel into a mask of shape [T, 257]. The covariances have shape [F, M, M] = [257, 4, 4]: 257 small matrices. The weights have shape [F, M] = [257, 4]. The beamformer output has shape [T, F], one channel, which the inverse STFT turns back into a waveform. On a robot the covariances update as a running average, Φ ← λΦ + (1 − λ) m x xH with λ near 0.99, so they follow a changing room.
pythonimport numpy as np def souden_mvdr(X, mask, ref=0, load=1e-3): # X: (M, T, F) complex STFT, mask: (T, F) speech probability in [0, 1] M, T, F = X.shape Xf = np.transpose(X, (2, 1, 0)) # (F, T, M) ms, mn = mask.T[..., None], (1 - mask.T)[..., None] # (F, T, 1) outer = np.einsum('ftm,ftn->ftmn', Xf, Xf.conj()) # (F, T, M, M) phi_s = (ms[..., None] * outer).sum(1) / ms.sum(1)[..., None] # (F, M, M) phi_n = (mn[..., None] * outer).sum(1) / mn.sum(1)[..., None] phi_n += load * np.trace(phi_n, axis1=1, axis2=2).real[:, None, None] / M * np.eye(M) G = np.linalg.solve(phi_n, phi_s) # (F, M, M) = phi_n^-1 phi_s w = G[:, :, ref] / np.trace(G, axis1=1, axis2=2)[:, None] # (F, M) return np.einsum('fm,mtf->tf', w.conj(), X) # Y: (T, F)
Two things damage the covariance: too few snapshots, and speech leaking into the noise average through a wrong mask. The device measures both on the Chapter 5 array. It draws snapshots from a known scene, builds R̂ from K of them, makes MVDR weights, and then scores the weights against the true noise covariance.
The purple curve is MVDR built from K snapshots. The flat green line is MVDR with the true covariance. The grey line is delay-and-sum. Raise the leakage and the curve sinks; add loading to lift it.
Illustrative scene, computed live from 30 fixed random draws: four microphones 4 cm apart, 2,000 Hz, talker straight ahead (power 1), one interferer at 40° (power 1, 20 dB above the 0.01 hiss), exact aiming. Leakage is the share of the K snapshots that wrongly contain the talker. Output ratio is the mean over the 30 draws, in dB, scored with the true noise covariance.
Read the lessons off the curves. In this tidy scene, even 8 clean snapshots land within about 2 dB of the best possible. But with 20% of the snapshots contaminated by the talker, 8 snapshots score about 11 dB, 12 dB below the clean case. Loading of 10 times the hiss lifts that to about 17 dB. Waiting for 200 snapshots lifts it to about 22 dB, but a robot that waits 200 frames (3 seconds at a 16 ms hop) has already missed the start of the sentence. Masks that are good, loading, and a running average are the three levers.
The beamformer output is a single channel. A recogniser turns it into features, often an 80-band log-mel table of shape [T, 80], and then into words (our audio representations lesson builds those features, and the streaming speech lesson covers recognisers that work while you talk). Two practical rules follow. First, judge the front end by the recogniser’s word error rate on your robot’s own recordings, not by listening or by SNR alone. A distortionless beamformer is gentle with speech, while aggressive noise removal can introduce artefacts that confuse a recogniser. Second, if the recogniser was trained on clean audio, test it on the beamformed audio, and fine-tune it on that output if there is a gap.
Ego-noise fits the same recipe. A robot’s motors have a fixed position next to the array, so their covariance can be measured whenever the robot moves and nobody speaks, kept as a profile, and added to Φn while the motors run. The beam then places a hole in the motors’ direction without waiting for the mask to find them.
Chapter 11
Collect the numbers, the checklist, the core code and the sources in one place
You can now follow one voice through a noisy room from the physics to the recogniser. The chain is short. Sound from a direction reaches microphones at slightly different times. Spacing under half a wavelength keeps those times unambiguous. Delaying and adding steers a beam. Weights built from the noise covariance (MVDR) place a hole on the interference, and loading keeps the hole from swallowing the talker. GCC-PHAT turns a pair into a delay, SRP-PHAT turns many pairs into a direction, a tracker keeps the direction steady, and masks supply the covariance that the beamformer needs. Return to the listening demo at the top and you can explain every shape in it.
| Quantity | Value or rule | Worked case |
|---|---|---|
| Speed of sound | 343 m/s at 20 °C, about +0.6 m/s per °C | 35 °C gives about 352 m/s |
| Pair delay | τ = d sin θ / c | d = 8 cm, 30°: 116.6 µs = 1.87 samples at 16 kHz |
| Spacing limit, any steering | d < λmin/2, fmax = c / (2d) | 4 cm: 4,287 Hz. 5 cm: 3,430 Hz |
| Spacing limit, steered to θ0 | f = c / (d (1 + |sin θ0|)) | 4 cm, straight ahead: 8,575 Hz |
| Delay-and-sum first null | sin θ − sin θ0 = λ / (N d) | N = 4, d = 4 cm, 4 kHz: 32.4°. At 2 kHz: none |
| Hiss reduction | 10 log10 N dB for equal weights | 4 microphones: 6.0 dB |
| MVDR weights | w = R−1 a / (aH R−1 a) | Two-microphone example: TV −43 dB, ratio −17 dB to 0 dB |
| Loading | R + εI; ε large gives delay-and-sum | 30 dB talker, 2° error: −5.4 dB plain, 15 dB at 10 × hiss |
| GCC-PHAT | IFFT of G / |G|, zero-padded 8 times | 1,024 samples to 8,192 points; 3.4 samples at 20 cm is 21.4° |
| SRP-PHAT cost | pairs × bins × directions per frame | 6 × 100 × 180 = 108,000 complex multiplies |
| STFT shapes | 512 window, 256 hop at 16 kHz | 257 bins, 31.25 Hz each, X is [4, T, 257] |
| Smoothing lag | rate × (1 − α) / α | 1.4° per frame at α = 0.2: 5.7° |
A few terms to keep straight. A steering vector is the phase pattern a wave from one direction makes across the array. A beam pattern is the array’s gain against direction. A null is a direction of near-zero gain. A grating lobe is a ghost copy of the beam caused by wide spacing. Signal cancellation is when an adaptive beamformer removes the talker. Ego-noise is the robot’s own motor and fan sound. A mask is a time-frequency table of speech probabilities.
pythonimport numpy as np C = 343.0 def steering(f, x, theta): # f: (F,), x: (M,) metres, theta: radians return np.exp(-2j * np.pi * f[:, None] * x[None, :] * np.sin(theta) / C) # (F, M) def mvdr(R, a, load=1e-3): # R: (M, M) noise covariance, a: (M,) R = R + load * np.trace(R).real / len(a) * np.eye(len(a)) Ra = np.linalg.solve(R, a) return Ra / (a.conj() @ Ra) # weights w, so y = w.conj() @ x def gcc_phat(x1, x2, fs, d, pad=8): # x1, x2: (1024,) frames n = len(x1) G = np.fft.rfft(x2) * np.fft.rfft(x1).conj() # (513,) cross-spectrum cc = np.fft.irfft(G / (np.abs(G) + 1e-12), n=pad * n) # (8192,) lags in 1/8 sample m = int(np.ceil(d * fs / C) + 1) * pad cc = np.concatenate([cc[-m:], cc[:m + 1]]) # lags -m ... +m lag = (np.argmax(cc) - m) / pad # samples, positive: mic 2 later return lag, np.degrees(np.arcsin(np.clip(C * lag / (fs * d), -1, 1)))
Together with das_stft from Chapter 4 and souden_mvdr from Chapter 10, this is a working front end. Test it first on a recording you made yourself: two phones on a table, a clap, and the lag you expect from a tape measure.
Delay-and-sum and MVDR belong to the classical array-processing family that Van Veen and Buckley surveyed in 1988 as spatial filtering. GCC and its PHAT weighting come from the time-delay-estimation work of Knapp and Carter. SRP-PHAT was developed for talker localisation in reverberant rooms. Modern robot stacks such as ODAS chain localisation, tracking and separation on embedded hardware, and modern recognisers often take the beamformer’s output or learn from several channels directly. The physics in this lesson stays the same under all of them.
Every claim above traces to one of these, and every device is a calculation you can repeat. Toy scenes are labelled as such in their fine print. No vendor application note was opened.
Now press Present or Teach and explain one step out loud from memory: how a 4 cm spacing sets a 4,287 Hz limit, why MVDR can cancel the talker, and how GCC-PHAT finds a delay in an echoing room. Then go back to the listening demo, put the TV at 20° and switch between delay-and-sum and MVDR, and say what the weights are doing.