HomeNotes

Knowing when someone is speaking is not the same as knowing what is noise.

The microphone stores one mixed pressure line: your voice plus the fan. VAD only answers when speech is happening. Time gating uses that answer as a switch. Spectral denoising asks a finer question: at this time and this frequency, how much should we keep?

The split

Four jobs people mix up when they say “clean this up.”

A recording does not arrive with a voice track and a fan track. At each instant the file only has their sum.

y(t) = s(t) + n(t)

You talk; a fan runs. The mic writes the added pressure. Nothing inside the file is already labelled “speech” or “fan.”

ToolWhat it decides or changesWhat you get
VADWhich frames look like speechLabels, scores, or time spans
Speech enhancementWhich parts of the mix to turn downA processed waveform
Target-speaker extractionWhich speaker to keep when several people talkOne speaker’s signal
EQ, compression, gainTimbre and loudness, not “who is talking”The same mix, rebalanced

The plots below reuse the waveform / spectrum / spectrogram reading from the acoustics primer. Same teaching synthesis: vowels, an s, and a steady background.

The same clip

Time gating versus a simple spectral denoise.

Teaching synthesis: vowels + s-like friction + a stable background. All three panels use the same colour scale.

AMixed recordingSpeech and pauses both carry background noise
BGate on true speech timesPauses go quiet; the mix during speech stays
CSimple spectral denoiseNoise during speech is also reduced; some residue and distortion remain

Green ticks: known speech intervals, including s. Panel B uses this ground truth, not a VAD model. Darker means more spectral energy. C estimates noise from the opening non-speech stretch; it is not the ceiling of modern systems.

The comparison uses the same playback gain, with a half-second gap between versions.

  • A → B: non-speech time goes white. During speech, the fan is still there.
  • A → C: background energy during speech also drops. Vowel structure is kept as far as this simple mask allows.
  • The s region: it looks like a sheet of high-frequency noise, but it is speech that should survive.

s, f, and sh can look like noise on a spectrogram. Deleting “everything that looks like hiss” will eat the consonant.

Panel B deliberately uses the known speech intervals, removing detection errors from the example. Even perfect VAD cannot remove a fan with time gating while someone is speaking.

VAD

Voice activity is not the same as vocal-fold vibration.

VAD answers a timing question. It divides a recording into short frames, then uses energy across frequency bands and changes over time to estimate whether each frame contains speech.

  • s, f, sh have no stable F0, but they are still speech.
  • A machine hum can be very periodic and still not be a person talking.
  • So VAD cannot be “keep it if we found an F0.”

That is the same split as the last page: periodicity is one cue. It is not the definition of speech.

A loudness threshold is the naive version: clap the desk and it opens; speak softly and it misses. Systems such as classic WebRTC VAD add band features and speech/noise statistics. Silero-style models can output speech time spans.

Real pipelines add hangover: do not close on a tiny pause, and after speech is confirmed, keep a little audio from just before. That cuts “the first character is eaten” and “the tail snaps off.” Mute, clip, or send to recognition is a later choice.

Using that decision to switch the audio is time gating: open for speech, close or fade for the rest.

The fan is still on while you talk. Opening the gate still lets through “speech + fan.”

The mask

From “this stretch of time” to “this frequency at this moment.”

Each spectrogram cell represents one moment and one frequency. Suppression-based denoisers assign a gain mask to every cell, then transform the processed frames back into a waveform.

Ŝ(t, f) = G(t, f) Y(t, f)

  • Y(t, f): complex spectrum of the mix
  • G(t, f): how much of that cell to keep
  • Ŝ(t, f): estimated speech spectrum after the mask

G near 1 keeps most of the cell. G near 0 pushes it down. Then overlap-add puts the sound back together.

MixOne waveform, speech plus noise
→
FramesShort overlapping windows, then a spectrum
→
GainsEstimate a gain for each time-frequency cell
→
ReshapeMultiply, invert, overlap-add

A teaching mask at one instant of [a]: keep formant ridges, turn down the gaps. Not a learned model.

Time gating is a switch for a whole spectrogram column. A spectral mask can treat the cells in that column differently.

If one cell contains both voice and noise, multiplying by G reduces both. The improvement comes from preserving cells dominated by speech and suppressing those dominated by noise; the mask cannot perfectly separate sources within a single cell.

A traditional estimator watches non-speech, then stores the average noise power per frequency — the statistics of the fan, not a copied waveform to subtract. The fan’s instant waveform keeps changing. VAD can say when those statistics are safe to update; not every denoiser needs a separate VAD.

Neural denoisers learn gain masks from many examples of clean speech mixed with noise, rather than relying on a hand-written rule. They can still mistake breath, soft speech, or a fricative for noise. Sudden knocks are harder than a steady fan because the previous noise estimate no longer matches the sound.

Whose voice

“Make the voice stand out” depends on which voice you mean.

If the recording contains your voice and a fan, ordinary speech enhancement is the right tool.

If the job is “me and the person beside me talking at once,” both streams have harmonics, formants, and speech rhythm. A generic VAD will call both speech. “Is it a human voice?” cannot choose who to keep.

Then you need extra information.

Typical extras:

  • Speaker identity: a reference clip of the target talker. VoiceFilter-style models use this.
  • Direction: several microphones, then delays and phases — beamforming toward one place.
  • Sound class: vocals versus accompaniment is a different separation job.
ProcessWhat it changesWhat to watch
EQBalance of bandsNoise in the same bands moves too
Compression / AGCHow loudness swingsQuiet noise in gaps can come up
DereverbReflection tailsNot the same problem as a fan
Target speakerTry to keep one personNeeds identity cues; others can leak

Turning the whole file up does not raise SNR. If speech power is 4 and noise is 1, a uniform boost leaves the ratio at 4:1.

How to listen

Do not judge denoising by how quiet the pauses become.

The part that matters is during speech.

  • Are the first and last characters whole?
  • Are weaker consonants such as s, f, sh still there?
  • Did the noise behind the voice actually drop?
  • Watery, metallic, pumping, or chopped artefacts?
  • With a quieter background, are the words easier — and still natural?

Suppress too much of the frication in 沙 and the background may sound cleaner while the word becomes less clear. Denoising always balances noise reduction against speech quality.

Check

Think, then tap.

A silent pause is easy. The mix while someone is talking is the real test.

1. VAD is perfect, and you time-gate on it. Can the fan during speech disappear?

2. s has no stable F0. Should VAD drop it?

3. A spectrogram cell holds both a formant and fan energy. A gain of 0.5 does what?

4. You boost the whole file. Speech was 4, noise 1. New SNR?

5. After denoising, pauses are silent but 沙 is dull. Fair review?

A clean, complete recording makes pitch feedback more reliable.

If gating removes the first syllable or a spectral mask suppresses s, the tone plot may break for the wrong reason. Record in a quiet, consistent space, then compare the F0 contour in Jyutone.