Skip to content

feat: speak ~N as "about N"; fix "dedupe" pronunciation#46

Merged
StuBehan merged 1 commit into
mainfrom
feat/normalize-tilde-and-dedupe
Jul 17, 2026
Merged

feat: speak ~N as "about N"; fix "dedupe" pronunciation#46
StuBehan merged 1 commit into
mainfrom
feat/normalize-tilde-and-dedupe

Conversation

@StuBehan

Copy link
Copy Markdown
Collaborator

Summary

Two things espeak reads wrong in dev output, both fixed in the normalize pipeline.

Changes

  • ~N → "about N" — a locale unit/symbol rule so ~ before a number is voiced as an approximation (~1,234 → "about 1234") instead of "tilde one hundred twenty-three". Leaves ~/path and non-numeric ~ untouched.
  • "dedupe" pronunciation — glued, espeak reads it as "de-dup" (short u). Added to the dev-term dict as "dee dupe" (reads "dee doop" — confirmed by ear), plus the inflections deduped / deduping / dedupes / dedup. Whole-word, so longer tokens aren't rewritten.

Testing

  • New tests/test_text.py cases: tilde before/after a number, ~/path left alone, tilde + decimal end-to-end; dedupe substitution across inflections + case, and a whole-word guard.
  • ruff check + ruff format --check clean; mypy clean; pytest — 45 text tests pass.
  • Live-checked via stackvox normalize (text) and synthesized the dedupe candidates to pick the spelling by ear.

CHANGELOG.md intentionally untouched — release-please owns it; lands as a feat in the next release.

@StuBehan
StuBehan force-pushed the feat/normalize-tilde-and-dedupe branch from 5e06e19 to 4d8a72a Compare July 17, 2026 14:52
@StuBehan
StuBehan force-pushed the feat/normalize-tilde-and-dedupe branch from 4d8a72a to 8e46b92 Compare July 17, 2026 19:02
@StuBehan
StuBehan merged commit 71c1eee into main Jul 17, 2026
10 checks passed
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