fix(ui): keep noise-floor readouts single-axis after VAD shift#132
Merged
Conversation
…/after pair Display-only change: the done-box "Noise floor" now shows a matched input→output room-tone pair on the astats RMS dBFS axis (both on the same measurement method and axis for honest comparison), replacing a confusing single value that silently swapped between input and output stages. Report definitions clarify floor_dbfs (input VAD momentary-LUFS seed) vs measured_floor_dbfs (input RMS) as distinct quantities. Byte-identical audio and run-record data; report text only. Signed-off-by: Martin Wimpress <code@wimpress.io>
`InputRoomToneFloorDB` is the single display resolver for input room-tone RMS
floor, shared by the done-box "before" and live Analysis box. Its fallback to
`NoiseProfile.MeasuredNoiseFloor` silently switches axes: that field is
K-weighted momentary-LUFS (the VAD/afftdn-seed floor, overwritten in
detectVoiceActivity), not astats RMS dBFS. An absent ElectedRoomToneSample
must yield ok=false, not a cross-axis number.
- Remove the momentary-LUFS fallback entirely; return ok=false when no
ElectedRoomToneSample exists
- Add guards for NaN/Inf/zero RMSLevel (unmeasured) - return ok=false
- Fix stale comment claiming both operands are astats RMS (fallback was LUFS)
- Reference the new "Measurement axes" section in AGENTS.md
- Centralise the resolver so live box and done box cannot diverge
- Update tests: no momentary-LUFS leakage, live==done invariant on both paths
Fixes the latent defect caught during the VAD axis audit.
Signed-off-by: Martin Wimpress <code@wimpress.io>
Contributor
There was a problem hiding this comment.
1 issue found across 15 files
Confidence score: 4/5
- In
internal/ui/summary.go, the discarded boolean fromInputRoomToneFloorDBmeans missing/zero/NaN room-tone values render as "0 dB" in the Analysis box instead of an unmeasured state, which can mislead users into thinking a valid measurement exists and create inconsistency with the done-box display—propagate that bool and shown/a(or equivalent guard) before merging.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
The live Analysis box was discarding the ok bool from InputRoomToneFloorDB,
rendering unmeasured room-tone floors as "0 dB" and computing a bogus
SeparationDB against that zero. The done-box correctly shows "n/a" when
unmeasured, so the two surfaces diverged on the exact axis-consistency this
branch guarantees.
- Add HasNoiseFloor bool field to AdaptedSummary (matches HasSpeech/HasSibilance
convention)
- Capture InputRoomToneFloorDB's ok bool; compute SeparationDB only when both
a SpeechProfile and a measured floor exist
- Render unmeasured floor as dim "n/a" and suppress SNR Gap row, matching
doneBoxNoiseFloorRow convention exactly
- Extend live-box == done-box invariant test to lock the unmeasured path;
add TestUnmeasuredFloorNoSeparation
Signed-off-by: Martin Wimpress <code@wimpress.io>
Contributor
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Auto-approved: UI display fixes to keep noise-floor readouts on the astats RMS axis; adds input/output floor resolvers and updates done-box and live analysis. Display-only, no audio changes.
Re-trigger cubic
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.
The VAD redesign moved Noise.Floor / MeasuredNoiseFloor onto the K-weighted
momentary-LUFS axis, but the TUI and report still mixed that with the
astats RMS dBFS room-tone floor. Same-named "noise floor" numbers disagreed
across surfaces and one resolver silently switched axes. This branch pins
every displayed floor to the astats RMS dBFS axis and documents the trap.
both on the astats RMS dBFS axis and the same measurement method, so the
before/after is honestly comparable (was a single value that swapped stages)
(InputRoomToneFloorDB) so they cannot diverge
(momentary-LUFS): an absent ElectedRoomToneSample now yields ok=false,
not a cross-axis number; guard NaN/Inf/zero RMSLevel as unmeasured
measured_floor_dbfs (input astats RMS) as distinct quantities
("Measurement axes") to stop the class of bug recurring
Display-only: byte-identical audio and run-record data, report text only.