fix: preserve speaker labels across short ASR gaps - #863
Open
Optic00 wants to merge 3 commits into
Open
Conversation
Greptile SummaryThe PR allows speaker labels to survive bounded ASR gaps and records the omitted intervals for persistence, display, and export.
|
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.
Description
Speaker labeling previously fell back to an unlabeled transcript whenever an individual diarized turn produced no ASR text. A short silent or unrecognized turn could therefore discard the speaker attribution for the entire recording.
This change tracks those gaps instead of failing immediately. Speaker labels are retained only when every remaining gap is at most 5 seconds and the total omitted audio is at most
min(30 seconds, 1% of diarized duration).When labels are retained despite gaps, FluidVoice stores and displays an explicit limitation notice. The fallback path also logs the actual reason when labels cannot be retained.
Type of Change
Related Issue or Discussion
Closes #18
Testing
swiftlint --strict --config .swiftlint.yml Sourcesswiftformat --config .swiftformat Sourcesorigin/mainswiftlintandswiftformatare not installed on the test machine, so these checks are intentionally left unchecked.Screenshots / Video
Notes
The thresholds are deliberately conservative. Labels are retained only when the omitted material is small enough that the speaker-attributed transcript remains trustworthy.