feat(web): add mic noise suppression and adaptive VAD#64
Merged
Conversation
Caller-side (browser) noise robustness; relay pipeline untouched (output stays 16kHz PCM16 base64 100ms chunks, VAD state machine semantics unchanged). - web-recorder.ts: mic chain source -> high-pass (100Hz) -> Speex denoiser (WASM AudioWorklet via @sapphi-red/web-noise-suppressor, dynamically imported to avoid SSR breakage) -> capture. Graceful fallback to browser-native noiseSuppression if assets fail. - vad.ts: thresholds adapt to ambient noise floor via asymmetric EMA (fast decay / slow attack, capped); degenerates to existing fixed thresholds in quiet environments. - Vendored speexWorklet.js + speex.wasm (v0.3.5 dist, SHA-256 verified against npm) into public/noise-suppressor/ since AudioWorklet modules must load by URL. Quality Score: 83/100 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
sonsangwoo1116
added a commit
that referenced
this pull request
Jul 3, 2026
revert(web): remove mic noise suppression and adaptive VAD (#64)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
noiseSuppression, plus a noise-floor-adaptive client VAD.Changes
apps/web/lib/audio/web-recorder.ts— mic chainsource → high-pass → Speex denoiser → capture; package dynamically imported (touches browser-only globals at module scope, breaks SSR otherwise); graceful fallback to native suppression if assets fail; wasm fetched once per page and reused across calls.apps/web/lib/audio/vad.ts— thresholds adapt asmax(fixed minimum, noiseFloor × ratio)with asymmetric EMA floor tracking (fast decay 0.3 / slow attack 0.05, cap 0.04); speech-level frames excluded from floor updates; degenerates to existing fixed thresholds in quiet rooms. Debug getters added.apps/web/public/noise-suppressor/— vendoredspeexWorklet.js+speex.wasmfrom@sapphi-red/web-noise-suppressor@0.3.5dist (AudioWorklet modules must load by URL; SHA-256 verified against npm).apps/web/package.json/package-lock.json— new dependency@sapphi-red/web-noise-suppressor@0.3.5(MIT).Quality Gate
stop()-during-start()race window widened by new awaits; silent catch on denoiser fallback could use aconsole.warnTest Plan
tsc --noEmit,eslint(touched files),next buildall pass/noise-suppressor/*in DevTools — recorder falls back gracefully🤖 Generated with Claude Code (
/auto-commit)