Skip to content

fix(asr): Preserve names, possessives and surrounding words - #1041

Open
achembarpu wants to merge 2 commits into
FluidInference:mainfrom
achembarpu:fix/vocabulary-overcorrection
Open

achembarpu wants to merge 2 commits into
FluidInference:mainfrom
achembarpu:fix/vocabulary-overcorrection

Conversation

@achembarpu

Copy link
Copy Markdown
Contributor

Why is this change needed?

Vocabulary rescoring can duplicate already-correct names, remove possessive endings, or consume the word following a hyphenated full name.

Examples:

  • mister Quilter becomes Quilter Quilter.
  • mister Quilter's manner loses its possessive.
  • Correcting Chandra Shankar-Solansky said deletes said.

What changes?

  • Protect recognized vocabulary phrases and preserve singular possessives in scoring and replacement text.
  • Bound acoustic search margins at separately timed occurrences of the same name.
  • Prevent separate candidates from borrowing the same acoustic occurrence outside their source spans.
  • Suppress positive bias for weak matches that would create adjacent duplicates, while retaining normal bias for close spellings and exact aliases.
  • Allow shorter source spans when their hyphen-separated component count exactly matches a canonical phrase or registered alias, preserving the existing span ceiling and multi-word similarity floor.

Legitimate corrections remain available, including longer full-name corrections that preserve recognized prefixes. Coarse overlapping timestamps do not establish acoustic ownership. The production logic contains no special-case names or verbs.

Add licensed real-speech fixtures and regression coverage for name preservation, possessives, repetitions, aliases and hyphenated name boundaries.

Validation

  • 176 XCTest and 10 Swift Testing checks pass in the final affected selection.
  • ASR-only Release build and touched-file formatting pass.
  • Real-audio comparisons cover seven recordings across four ASR models under app and SDK-default policies.
  • Both short Quilter recordings remain verbatim under the app policy for all four models; legitimate Solanki corrections remain available.
  • The name-boundary correction leaves 54 of 56 outputs unchanged and restores exactly said in the two affected v2 outputs.
  • Actual app consumer validation reproduces the missing word before the boundary fix and preserves the complete expected transcript afterward. Existing v3/shared-110M preservation checks also pass.

The broader streaming-rescue test class still reproduces the existing upstream Hey → Codex false positive and was excluded from the passing selection. Other acoustic-rescue false positives remain outside this fix. No performance claim.

Dependencies

None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant