Add a default noise floor. #13

Merged
liamwarfield merged 5 commits from feature/stop-sending-when-quiet into main 2026-01-19 22:07:06 +00:00

5 Commits

Author SHA1 Message Date
liamwarfield c5fcb125c6 Fix bug with buffer clearing.
Build Mumble Web 2 / linux_build (push) Successful in 1m30s
Build Mumble Web 2 / windows_build (push) Successful in 2m37s
Build Mumble Web 2 / android_build (push) Successful in 6m0s
2026-01-19 14:57:12 -07:00
liamwarfield 95c7981632 Refactor web.rs match statement. 2026-01-19 14:57:12 -07:00
liamwarfield d4c1003f97 Fix buffering silence issue.
This fixes a bug where we were still appending silence to the output
buffer while not transmitting.
2026-01-19 14:57:12 -07:00
liamwarfield 3ddf892169 gui: Add terminator packet and 200ms voice hold for VAD
Implements proper voice activity detection with:
- 200ms hold period after audio drops below threshold to prevent choppy cutoffs
- Terminator packet (end_bit=true) when speech ends to signal stream completion
- TransmitState enum to track transmission state across frames

This ensures other Mumble clients receive proper end-of-speech signaling
for clean audio termination and correct "talking" indicator behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 14:57:12 -07:00
liamwarfield 2cb03208b4 Add a default noise floor.
Pretty simple, if the average amplitude is under a certain value clear
out the buffer! The value I chose (.001) was an arbitrary value I got
from printf debugging. I was able to show that this worked pretty well
on the desktop session. Hopefully we'll add this to the settings page at
some point.
2026-01-19 14:57:12 -07:00