Loading…
Reference in a new issue
No description provided.
Delete branch "fix/574-576-vocabulary-echo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two halves of the same loop: what goes to Whisper in the
initial_prompt, and what comes back out of it on quiet audio. #574 is why #576 has one more shape to catch.#574 — terms were sent malformed
clean_termshaved_EDGE_PUNCTUATIONoff both ends unconditionally, so the campaign's own names reached the ASR asViquilonto (Viq(unbalanced) andWhispering Lantern Supply Co(truncated).The trailing end is now walked one character at a time and stops at a closing bracket whose opener is inside the term, or a full stop that ends an abbreviation. Leading punctuation still goes unconditionally — nothing typed in front of a name belongs to it. A stray
Aramore)still loses its bracket, because nothing in the term opened it.#576 — the echo rule only caught whole terms
On the session that motivated #569, the whole-term rule dropped one segment; nine echoes survived because Whisper gives back a piece: "Fulfillment", "Mimic", "Mimic's" — each alone on a line, several times, across different speakers.
Two new rules, both whole-segment like everything else in this filter:
OfficeandPropheticbuild fragments andofdoes not. Single-letter tokens — what normalisation leaves of a possessive — are ignored when matching, which is howMimic'sis recognised as the same echo asMimic.The one judgement call in here — worth your eye
The issue asked for a third condition: "and the segment is not also an ordinary dictionary word that people say alone." I did not implement that, and the effect is that a fragment which is also an ordinary word —
Officeis the realistic example — is dropped when it is the entire segment. A player who says just "Office." loses that one-word line.I took that trade deliberately, for the reason the module already states at the top of the section: "the cost of a false positive is one contentless line, which is what lets the rules be exact rather than clever." The alternative is shipping a dictionary to decide whether a word is ordinary, and being wrong about it in a way nobody can review — a second thing to be wrong, about text that is already gone.
It is reversible in one line (raise
_ECHO_FRAGMENT_MIN_LETTERS, or require two tokens for a fragment) if you would rather keep those lines. Say so and I will.Tests
tests/test_asr_vocabulary.pyandtests/test_hallucination_filter.py, following each file's existing structure. Nine tests were confirmed to fail against the pre-fix source (3 for #574, 6 for #576); the rest are guards that pass either way by design — a function word from a term, a fragment inside a sentence, a fragment of a person's name, the single form of a doubled name, and a stray bracket still being stripped.Backend suite:
3449 passed, 13 skipped.ruff checkandruff format --checkclean under CI's pinned 0.4.4.Closes #574
Closes #576
🤖 Generated with Claude Code