Skip to content

feat: suggest known speaker names while typing (#144) - #146

Open
raphaelm22 wants to merge 1 commit into
ObscureAintSecure:masterfrom
raphaelm22:feat/speaker-name-autocomplete
Open

raphaelm22 wants to merge 1 commit into
ObscureAintSecure:masterfrom
raphaelm22:feat/speaker-name-autocomplete

Conversation

@raphaelm22

Copy link
Copy Markdown

Closes #144

What

Each name field in the Speakers panel now pops up the names already used in other recordings while you type.

  • app/ui/speaker_name_suggestions.py (no Qt): known_speaker_names reads every */speaker_names.json under the recordings folder, ranks names by how many recordings use them, and collapses spellings that differ only in case, accents or spacing (most used spelling wins, latest recording breaks ties). matching_names matches any word, ignoring case and accents; word-start matches come before substring matches; names already given to another speaker of the recording and the exact text typed are left out.
  • SpeakerNamePanel: one QCompleter per field in UnfilteredPopupCompletion mode, fed by matching_names on textEdited (Qt's own filter is prefix-only and accent-sensitive). Picking a name sets the text, so names_changed fires as for typing. Loading the names can't fail the panel.

Why

Typing names from scratch leaves one person under several spellings, which splits search and summaries, and, with #128, voice profiles.

Tests

tests/test_speaker_name_suggestions.py: 17 tests (ranking, spelling collapse, corrupt files, accent-free matching, exclusion, the popup handler against a stub panel). Full suite: 425 passed.

Checked with an offscreen SpeakerNamePanel (typing, popup contents, ↓ + Enter, popup hidden when nothing matches) and against a real recordings folder (12 names, 7 recordings).

Follow-up once #129 lands: also offer voice-profile names, since a profile outlives the recordings it was trained from (done in my local build, ~10 lines).

🤖 Generated with Claude Code

Typing a name from scratch in every recording leaves one person under
several spellings, which splits search, summaries and voice profiles.
Each name field now pops up the names used in the other recordings
(speaker_names.json), most used first, matching any word and ignoring
case and accents. Names already given to another speaker of the same
recording are not offered.
@raphaelm22

Copy link
Copy Markdown
Author

Ready for review. Checked in an offscreen panel and against a real recordings folder; not yet in daily use.

@raphaelm22
raphaelm22 marked this pull request as ready for review October 22, 2026 13:28
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.

Suggest known speaker names while typing, so one person keeps one spelling

1 participant