<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Lance Kong Engineering]]></title><description><![CDATA[Lance Kong Engineering]]></description><link>https://lanceklx.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Dec 2026 21:00:10 GMT</lastBuildDate><atom:link href="https://lanceklx.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Why AI Voice Enhancers Sound Robotic (And How the 75–85% Dry/Wet Rule + 48 kHz DSP Fix It)]]></title><description><![CDATA[The acoustic math behind 16 kHz artifacts, sample-locked Web Audio Dry/Wet mixing, and lossless FFmpeg -c:v copy 4K remuxing.]]></description><link>https://lanceklx.hashnode.dev/why-ai-voice-enhancers-sound-robotic-and-how-the-75-85-dry-wet-rule-48-khz-dsp-fix-it</link><guid isPermaLink="true">https://lanceklx.hashnode.dev/why-ai-voice-enhancers-sound-robotic-and-how-the-75-85-dry-wet-rule-48-khz-dsp-fix-it</guid><category><![CDATA[FFmpeg]]></category><category><![CDATA[Web Audio API]]></category><category><![CDATA[audio]]></category><category><![CDATA[AI]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[lance Kong]]></dc:creator><pubDate>Thu, 03 Dec 2026 05:04:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b10f4c7032ad60dbabc0780/f2c1fb44-fa0a-48a2-9cb8-4e994ad3c1ca.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<p><em>Originally published on</em> <a href="https://clearmyclip.com/en/guides/fix-robotic-ai-voice-dry-wet-rule"><em>ClearMyClip Acoustic Guides</em></a><em>. This expanded engineering write-up breaks down the 16 kHz vs. 48 kHz acoustics, parallel Dry/Wet DSP math, browser-side Web Audio mixing graph, and lossless FFmpeg</em> <code>-c:v copy</code> <em>remuxing pipeline.</em></p>
</blockquote>
<p>If you have ever dropped a noisy podcast clip, Zoom recording, or outdoor vlog into a one-click AI voice enhancer, you know the trade-off: the air-conditioner hum disappears, yet the speaker suddenly sounds like they are talking through a tin can underwater. Consonants smear, breaths chop off into dead digital silence, and rapid sentences get subtly warped.</p>
<p>Most creators assume this "robotic AI voice" artifact is an unavoidable side effect of neural noise suppression. It isn't. It comes from three concrete engineering shortcuts baked into many mainstream speech tools:</p>
<ol>
<li><strong>Downsampling audio to 16 kHz</strong> (hard-clipping everything above 8 kHz).</li>
<li><strong>Locking generative resynthesis at 100% Wet</strong>, clamping pauses to <code>-∞ dB</code> digital vacuum.</li>
<li><strong>Re-encoding the entire video track</strong> just to clean the audio—degrading 4K sharpness, stripping HDR metadata, and wasting minutes on re-renders.</li>
</ol>
<p>Below is the acoustic breakdown of why these artifacts happen, the DSP math behind the <strong>75–85% Dry/Wet parallel mixing rule</strong>, and the exact Web Audio API + FFmpeg <code>-c:v copy</code> workflow used to eliminate them.</p>
<hr />
<h2>1. The 16 kHz Bandwidth Cliff (Why Consonants Sound Metallic)</h2>
<p>Many legacy speech enhancers and real-time call filters downsample input audio to <strong>16 kHz</strong> to reduce compute. By the Nyquist–Shannon sampling theorem, a 16 kHz sample rate cannot represent any frequency above <strong>8 kHz</strong>.</p>
<p>That is fine for telephony intelligibility, but natural broadcast clarity and vocal "air" extend well above 8 kHz:</p>
<table>
<thead>
<tr>
<th align="left">Frequency Band</th>
<th align="left">Acoustic Role in Human Speech &amp; Noise</th>
<th align="left">What Happens in a 16 kHz Pipeline</th>
</tr>
</thead>
<tbody><tr>
<td align="left"><strong>50–300 Hz</strong></td>
<td align="left">Vocal fundamentals, chest warmth, 50/60 Hz mains hum &amp; harmonics (120/180/240 Hz), wind rumble</td>
<td align="left">Kept, though blunt high-pass filters often thin out vocal body</td>
</tr>
<tr>
<td align="left"><strong>300 Hz–1 kHz</strong></td>
<td align="left">Lower vocal warmth, boxiness, heavy outdoor wind turbulence</td>
<td align="left">Kept, prone to hollow artifacts under aggressive spectral gating</td>
</tr>
<tr>
<td align="left"><strong>1–4 kHz</strong></td>
<td align="left">Vowel formants &amp; core speech intelligibility</td>
<td align="left">Kept, heavily reshaped by neural masks</td>
</tr>
<tr>
<td align="left"><strong>4–10 kHz</strong></td>
<td align="left">Sibilants (<code>s</code>, <code>sh</code>, <code>f</code>, <code>t</code>), consonant attack, mic presence</td>
<td align="left"><strong>Hard-clipped at 8 kHz</strong>, creating lispy or metallic consonants</td>
</tr>
<tr>
<td align="left"><strong>10–16+ kHz</strong></td>
<td align="left">Natural room air, subtle breath detail, studio sheen</td>
<td align="left"><strong>Completely erased</strong> (zero energy above 8 kHz)</td>
</tr>
</tbody></table>
<p>When a 48 kHz studio mic or camera recording is crushed down to 16 kHz, denoised, and upsampled back to 48 kHz, the upper spectrum is gone. Worse, generative speech enhancers attempt to <em>re-synthesize</em> missing consonants from scratch—which is why fast speakers, non-native accents, or loud café chatter suddenly mutate into garbled, synthetic syllables.</p>
<p>Using full-band <strong>48 kHz non-generative neural separation</strong> (such as <strong>DeepFilterNet3</strong>) preserves the entire 24 kHz Nyquist bandwidth and separates vocal harmonics from background noise frame by frame—without hallucinating fake consonants.</p>
<p>You can hear the loudness-matched difference on the exact same 5.5-second recording:</p>
<ul>
<li><code>0:00</code> — Raw 60 Hz AC hum &amp; HVAC fan roar</li>
<li><code>0:06</code> — Typical 16 kHz over-gated AI (metallic, watery artifacts)</li>
<li><code>0:11</code> — Full-band 48 kHz neural separation (hum stripped, warm vocal body intact)</li>
</ul>
<p><a class="embed-card" href="https://www.youtube.com/watch?v=bX9EuXkpMFQ">https://www.youtube.com/watch?v=bX9EuXkpMFQ</a></p>

<p><em>(Fallback link if the embed doesn't load:</em> <a href="https://www.youtube.com/watch?v=bX9EuXkpMFQ"><em>Watch 16 kHz vs. 48 kHz A/B benchmark on YouTube</em></a><em>)</em></p>
<hr />
<h2>2. The Vacuum Effect &amp; The Math of the 75–85% Dry/Wet Rule</h2>
<p>Even with a clean 48 kHz model, running noise suppression at <strong>100% Wet</strong> creates an uncanny psychoacoustic flaw: <strong>the digital vacuum effect</strong>.</p>
<p>Real environments are never at <code>-∞ dB</code>. When a denoiser clamps pauses between words to absolute digital zero, human ears immediately hear the room "pumping" on and off with every syllable and breath.</p>
<p>Mastering engineers have solved this for decades with <strong>parallel processing</strong>: instead of replacing 100% of the signal, you sum the cleaned neural track (<em>Wet</em>) with a small, sample-aligned slice of the original recording (<em>Dry</em>).</p>
<p>Let the original noisy signal be:</p>
<pre><code class="language-text">x[n] = s[n] + v[n]    // s[n] = clean speech, v[n] = background noise
</code></pre>
<p>Assuming the denoiser produces an isolated speech estimate <code>s_hat[n] ≈ s[n]</code> with residual noise well below the original floor, a linear parallel mix at strength <code>w</code> (<code>0.0</code> to <code>1.0</code>) gives:</p>
<pre><code class="language-text">y[n] = w * s_hat[n] + (1 - w) * x[n]
     ≈ s[n] + (1 - w) * v[n]
</code></pre>
<p><em>(Note: in practice, any neural model leaves tiny residual noise</em> <code>v_res[n]</code><em>, so</em> <code>20 * log10(1 - w)</code> <em>represents the upper-bound floor reduction—which closely tracks real-world measurements whenever raw suppression exceeds ~25 dB.)</em></p>
<p>Two things happen simultaneously:</p>
<ol>
<li><strong>Speech amplitude stays invariant</strong> (<code>≈ 1.0 * s[n]</code>), so chest resonance and micro-consonants stay natural.</li>
<li><strong>Noise amplitude drops by</strong> <code>(1 - w)</code>, leaving a coherent, barely audible bed of natural room tone instead of dead vacuum:</li>
</ol>
<table>
<thead>
<tr>
<th align="center">Wet / Dry Mix (<code>w</code>)</th>
<th align="center">Residual Noise <code>(1 - w)</code></th>
<th align="center">Upper-Bound Floor Drop</th>
<th align="left">Recommended Starting Point</th>
</tr>
</thead>
<tbody><tr>
<td align="center"><strong>75% Wet / 25% Dry</strong></td>
<td align="center"><code>0.25</code></td>
<td align="center"><strong>−12.0 dB</strong></td>
<td align="left">Close-mic voiceovers &amp; studio podcasts with mild room tone</td>
</tr>
<tr>
<td align="center"><strong>80% Wet / 20% Dry</strong></td>
<td align="center"><code>0.20</code></td>
<td align="center"><strong>−14.0 dB</strong></td>
<td align="left">Multi-speaker interviews with AC hum or laptop fan hiss</td>
</tr>
<tr>
<td align="center"><strong>85% Wet / 15% Dry</strong></td>
<td align="center"><code>0.15</code></td>
<td align="center"><strong>−16.5 dB</strong></td>
<td align="left">Home-office Zoom/Loom calls, indoor lapel mics</td>
</tr>
<tr>
<td align="center"><strong>90% Wet / 10% Dry</strong></td>
<td align="center"><code>0.10</code></td>
<td align="center"><strong>−20.0 dB</strong></td>
<td align="left">Street vlogs, café chatter, mechanical keyboards next to mic</td>
</tr>
<tr>
<td align="center"><strong>95% Wet / 5% Dry</strong></td>
<td align="center"><code>0.05</code></td>
<td align="center"><strong>−26.0 dB</strong></td>
<td align="left">Heavy coastal wind gusts, downhill ski/cycling wind roar</td>
</tr>
<tr>
<td align="center"><strong>100% Wet / 0% Dry</strong></td>
<td align="center"><code>0.00</code></td>
<td align="center"><strong>−∞ dB (Vacuum)</strong></td>
<td align="left">Only when extreme noise completely buries speech</td>
</tr>
</tbody></table>
<p><strong>Quick ear test:</strong> Start at <code>100%</code>, loop a sentence heavy with <code>s</code> and <code>t</code> sounds, then slowly pull the slider down toward <code>80%</code>. Stop the exact moment the voice regains natural chest warmth without background noise creeping back. This <strong>75%–85% window</strong> is especially effective when you need to <a href="https://clearmyclip.com/en/clean-podcast-audio">clean podcast audio</a> with multi-speaker banter over steady HVAC drone.</p>
<hr />
<h2>3. Zero-Latency Dry/Wet Mixing in the Browser (Web Audio API)</h2>
<p>To let a user drag a 0–100% Dry/Wet slider and toggle instant A/B comparisons in real time—without re-uploading or re-running inference—you only need two <strong>sample-aligned</strong> 48 kHz buffers (<code>dryBuffer</code> and <code>wetBuffer</code>) feeding two <code>GainNode</code>s locked to the same <code>AudioContext</code> clock.</p>
<h3>The #1 DSP pitfall: Sub-millisecond comb filtering</h3>
<p>Before writing a single line of Web Audio code, verify <strong>zero-sample alignment</strong> between your dry and wet tracks.</p>
<p>Unlike perceptible echo (15+ ms), <strong>comb filtering</strong> kicks in at <strong>sub-millisecond</strong> offsets. A timing mismatch of <code>Δt</code> creates periodic destructive phase notches starting at <code>f = 1 / (2 * Δt)</code>:</p>
<ul>
<li>Just <strong>0.5 ms</strong> of drift (24 samples at 48 kHz) carves a deep notch at <strong>1 kHz</strong> (right through vowel warmth).</li>
<li><strong>0.1 ms</strong> (5 samples) notches <strong>5 kHz</strong> (right across vocal sibilants).</li>
</ul>
<p>Common culprits are STFT frame lookahead padding from neural models and AAC/MP3 encoder priming delay. Always decode or export both preview buffers as <strong>sample-aligned 48 kHz PCM</strong> (trimmed to identical zero-offset and length) before summing them.</p>
<p>Here is a production-safe TypeScript <code>DryWetPlayer</code> that handles browser autoplay suspension, lock-step playback start, and click-free gain ramping:</p>
<pre><code class="language-ts">export class DryWetPlayer {
  private ctx: AudioContext;
  private dryGain: GainNode;
  private wetGain: GainNode;
  private drySource: AudioBufferSourceNode | null = null;
  private wetSource: AudioBufferSourceNode | null = null;

  constructor(ctx: AudioContext, initialStrength = 0.82) {
    this.ctx = ctx;
    this.dryGain = ctx.createGain();
    this.wetGain = ctx.createGain();

    this.dryGain.connect(ctx.destination);
    this.wetGain.connect(ctx.destination);

    // Initialize directly before playback starts
    const w = Math.max(0, Math.min(1, initialStrength));
    this.wetGain.gain.value = w;
    this.dryGain.gain.value = 1 - w;
  }

  /**
   * Starts both buffers on the exact same audio-thread timestamp
   * so Dry and Wet stay sample-locked during scrubbing and A/B switches.
   */
  async play(dryBuffer: AudioBuffer, wetBuffer: AudioBuffer, offsetSec = 0) {
    if (this.ctx.state === "suspended") {
      await this.ctx.resume();
    }

    this.stop();

    // 20ms lookahead guarantees both sources start on the same render quantum
    const startAt = this.ctx.currentTime + 0.02;
    this.drySource = this.ctx.createBufferSource();
    this.wetSource = this.ctx.createBufferSource();

    this.drySource.buffer = dryBuffer;
    this.wetSource.buffer = wetBuffer;

    this.drySource.connect(this.dryGain);
    this.wetSource.connect(this.wetGain);

    this.drySource.start(startAt, offsetSec);
    this.wetSource.start(startAt, offsetSec);
  }

  /**
   * Anchors current gain before ramping over 15ms to prevent zipper noise
   * and mid-ramp clicks in Chrome/Safari during fast slider drags.
   */
  setStrength(strength: number) {
    const w = Math.max(0, Math.min(1, strength));
    const now = this.ctx.currentTime;
    const rampEnd = now + 0.015;

    this.rampParam(this.wetGain.gain, w, now, rampEnd);
    this.rampParam(this.dryGain.gain, 1 - w, now, rampEnd);
  }

  private rampParam(param: AudioParam, target: number, now: number, end: number) {
    param.cancelScheduledValues(now);
    // Anchor current value before linear ramp (prevents snap clicks on rapid drags)
    param.setValueAtTime(param.value, now);
    param.linearRampToValueAtTime(target, end);
  }

  stop() {
    for (const src of [this.drySource, this.wetSource]) {
      if (!src) continue;
      try {
        src.stop();
      } catch {
        // Ignore already-stopped nodes
      }
      src.disconnect();
    }
    this.drySource = null;
    this.wetSource = null;
  }
}
</code></pre>
<p>Two details that prevent subtle bugs in production:</p>
<ol>
<li><strong>Lock-step scheduling (</strong><code>ctx.currentTime + 0.02</code><strong>)</strong>: Calling <code>.start(0)</code> consecutively on two <code>AudioBufferSourceNode</code>s can land across a render-quantum boundary (128 samples ≈ 2.67 ms at 48 kHz), instantly causing comb filtering. Scheduling 20 ms ahead guarantees exact sample alignment.</li>
<li><strong>Anchor before ramping (</strong><code>setValueAtTime</code> <strong>→</strong> <code>linearRampToValueAtTime</code><strong>)</strong>: Calling <code>cancelScheduledValues(now)</code> alone without re-anchoring <code>param.value</code> causes discontinuities if the user drags the slider rapidly back and forth. Anchoring makes A/B toggling completely silent and click-free across Chrome and Safari.</li>
</ol>
<hr />
<h2>4. Don't Re-Encode 4K Video Just to Fix Audio (<code>-c:v copy</code>)</h2>
<p>If your source is a 4K/60fps iPhone HDR <code>.mov</code>, a Loom/Zoom screen capture with tiny IDE text, or a GoPro/DJI 10-bit Log clip, the worst thing an audio tool can do is decode and re-encode the video stream.</p>
<p>Re-encoding blurs crisp text, introduces sky banding, strips Apple HDR / Dolby Vision color tags, and turns a fast remux into a sluggish GPU render. Instead, touch <strong>only</strong> the audio stream and remux losslessly via <code>-c:v copy</code>:</p>
<pre><code class="language-bash"># Step 1: Demux to 48 kHz stereo PCM without touching video
ffmpeg -i input_4k.mov -vn -c:a pcm_s16le -ar 48000 -ac 2 raw_48k.wav

# Step 2: Run your 48 kHz denoiser on raw_48k.wav -&gt; produces sample-aligned wet_48k.wav

# Step 3: Blend 85% Wet / 15% Dry + optional -16 LUFS loudness normalization
#         IMPORTANT: normalize=0 disables amix's default 1/N (-6 dB) volume halving!
#         (Single-pass dynamic loudnorm shown; for broadcast mastering use two-pass linear mode.)
ffmpeg -i raw_48k.wav -i wet_48k.wav \
  -filter_complex "[0:a]volume=0.15[d];[1:a]volume=0.85[w];[d][w]amix=inputs=2:duration=first:normalize=0,loudnorm=I=-16:TP=-1.5:LRA=11" \
  -ar 48000 -c:a pcm_s16le cleaned_mix.wav

# Step 4: Lossless video remux — ZERO video re-encoding (-c:v copy)
#         -map_metadata 0 preserves color/rotation tags; -shortest avoids AAC priming tail drift
#         (For HEVC iPhone clips remuxed to .mp4, also add `-tag:v hvc1` for QuickTime/Safari compatibility)
ffmpeg -i input_4k.mov -i cleaned_mix.wav \
  -map 0:v:0 -map 1:a:0 \
  -map_metadata 0 \
  -c:v copy -c:a aac -b:a 256k \
  -shortest -movflags +faststart \
  output_4k_lossless.mp4
</code></pre>
<p>Two FFmpeg gotchas worth flagging if you script this yourself:</p>
<ul>
<li><code>normalize=0</code> <strong>in</strong> <code>amix</code>: By default, FFmpeg's <code>amix</code> divides every input by the number of inputs (<code>1/2 = -6 dB</code>), which silently halves your mix level even after you already scaled <code>volume=0.15</code> and <code>volume=0.85</code>. Always pass <code>normalize=0</code>.</li>
<li><code>-map_metadata 0</code> <strong>&amp;</strong> <code>-tag:v hvc1</code>: Copying the video bitstream without preserving container metadata (or without <code>hvc1</code> tagging when moving iPhone HEVC into <code>.mp4</code>) can lose portrait rotation flags or fail QuickTime playback.</li>
</ul>
<p>Keeping every video frame bit-for-bit identical is especially valuable for outdoor action footage (see our dedicated workflow for <a href="https://clearmyclip.com/en/guides/remove-wind-noise-gopro-dji-insta360-ski-bike">removing wind noise from GoPro, DJI Osmo &amp; Insta360 ski and bike videos</a>).</p>
<p>Here is a real coastal wind clip processed with 48 kHz separation and lossless video pass-through:</p>
<p><a class="embed-card" href="https://youtu.be/k5f5mC4Hmw8">https://youtu.be/k5f5mC4Hmw8</a></p>

<p><em>(Fallback link:</em> <a href="https://youtu.be/k5f5mC4Hmw8"><em>Watch coastal wind 48 kHz A/B demo on YouTube</em></a><em>)</em></p>
<hr />
<h2>Testing This Pipeline Without Scripting FFmpeg Locally</h2>
<p>I built ClearMyClip around this exact workflow—48 kHz DeepFilterNet3, a real-time 0–100% Web Audio Dry/Wet slider, and lossless <code>-c:v copy</code> 4K remuxing—because I got tired of either paying monthly SaaS subscriptions or watching clean 4K clips get re-encoded just to rescue one noisy recording.</p>
<p>If you want to audition the 75–85% rule on your own noisy clip, you can <a href="https://clearmyclip.com/en/remove-background-noise-from-audio">remove background noise from audio online</a> with a free 30-second real-time A/B preview and zero signup. Uploads are automatically deleted within 24 hours (zero AI training), and if you ever need a full export—lossless MP4/MOV, 48 kHz WAV, or 256k MP3—one-time credit packs start at $4.99 and never expire.</p>
<p>If you have hit comb filtering in Web Audio parallel graphs, weird QuickTime HEVC remux quirks, or stubborn 60 Hz hum harmonics in your own pipeline, drop a comment—always happy to compare DSP notes.</p>
]]></content:encoded></item></channel></rss>