Skip to content

Vocabulary: import words from Wispr Flow's dictionary - #569

Draft
bkcraft-1 wants to merge 2 commits into
stevyhacker:masterfrom
bkcraft-1:wispr-vocabulary
Draft

bkcraft-1 wants to merge 2 commits into
stevyhacker:masterfrom
bkcraft-1:wispr-vocabulary

Conversation

@bkcraft-1

Copy link
Copy Markdown

Summary

People moving from Wispr Flow can bring their dictionary along. The Language & vocabulary sheet (Settings → Models → Transcribe → Advanced, or search Settings for "vocabulary") gains Import from Wispr Flow…: it reads only the dictionary table of the Wispr Flow database the person picks, says how many words it will add, and after a confirmation appends them to Names and vocabulary. This is the "seed the dictionary" part of idea 6 from discussion #545.

  • What comes in: dictionary words, including the ones Wispr learned from the person's own edits. A replacement that isn't a snippet contributes its replacement when that is a term of up to four words.
  • What stays out: snippets (they can hold addresses or signatures, and the vocabulary goes to a transcription server when one is set), deleted entries, one-word everyday English words (they echo on quiet audio like generic title words, ADR 0005), and words already listed. At most 40 words and 480 characters come in, starred and most used first, the same budget as the automatic list.
  • Reading Wispr's database: opened the way MacWhisper's is (ADR 0006): immutable, or a private copy when the write-ahead log isn't empty. On APFS the copy is a clone, so a 900 MB database copies in about a millisecond. It is recognized by its Dictionary and SequelizeMeta tables, columns missing from an older or newer schema read as unknown, and another app's database is refused without quoting it. Dictation history, audio, notes and meetings are not read. Tested with Wispr Flow 1.6.1483, whose schema runs through migration 20261106120000-add-meetings-live-captured-ms.
  • Where: WisprFlowLibrary reads the database (next to the meeting importers, so a Wispr meetings reader can share it), WisprVocabularyImport is the pure decision, and the button sits in ModelTranscriptionOptionsSheet. The decisions are in ADR 0005, and PRIVACY.md gains "Words imported from Wispr Flow". Seven new strings in all 24 languages, machine-assisted like the existing ones.

Validation

On master 42374bde:

xcodebuild test -scheme LokalBot -skip-testing:LokalBotUITests CODE_SIGNING_ALLOWED=NO   (Xcode 27.2, macOS 26, pinned Bun)
  5,243 tests: 5,181 passed, 61 skipped, 1 failed
  - the failure, CodingAgentEvidenceTests/testASessionMovingOnLeavesAnEarlierDaysEvidenceAndDigestCurrent,
    fails the same way on master without this change on this Mac (also noted in #568)
  - WisprFlowLibraryTests 6/6 and WisprVocabularyImportTests 9/9 pass

swiftlint lint --strict --quiet      (0.65.1)
  exit 0, whole tree

python3 Scripts/ci/comment-ratchet.py --check
  Comment lines: 0 (baseline 0)

python3 -m unittest discover -s Scripts/tests
  266 tests: 264 pass, including test_localization; the 2 Google Play bundle-signing tests error here because this Mac
  has no keytool (Java), unrelated

python3 Website/generator/render_web.py --check
  exit 0

Against a real Wispr Flow 1.6.1483 database (counts only):
  53 dictionary entries read in 3 ms; the plan adds 36 words (320 characters) and leaves out 8 snippets,
  7 deleted entries and 2 everyday words

Manual, LokalBot Dev on my Mac:
  Import from Wispr Flow… opened in Wispr Flow's folder; picking flow.sqlite showed "Add 36 words from Wispr Flow?",
  and Add Words put the 36 words on a new line in Names and vocabulary (318 characters)
  a second import found all 36 already listed and said there were no new words to add

UI tests were not run locally, per AGENTS.md.

Changed test expectations

None.

Linked issues

Refs #545

Risk / rollout notes

  • Only on request: nothing changes until the person picks the database and confirms, and the added words can be edited or removed in the field like any vocabulary.
  • One visibility change: TranscriptionVocabulary.normalizedKey is now internal instead of private, so the import de-duplicates exactly the way the automatic list does.
  • Not in this PR, and possible follow-ups. Happy to do whichever of these you want, in whatever order:
    1. Wispr meetings next to the meeting importers: transcripts with speakers and summaries, and audio where Wispr still keeps it. It would add an "Import from Wispr Flow" choice where people try the meeting flow with their own recording.
    2. Corrections: Wispr keeps what it heard next to what the person changed it to. That is good seed data for idea 1 (learning from corrections), once LokalBot has an opt-in store for corrections. I'd rather agree that store's design with you first, in an issue.
    3. Replacements and snippets: LokalBot has nowhere to apply them today. If you'd want a "when I say X, write Y" list, I can open an issue with a sketch first.

bkcraft-1 and others added 2 commits November 21, 2026 13:38
The Language & vocabulary sheet (Settings → Models → Transcribe →
Advanced) gains "Import from Wispr Flow…". It reads the dictionary table
of the Wispr Flow database the person chooses (flow.sqlite), opened
read-only like other apps' databases (immutable, or a private copy when
the write-ahead log isn't empty), and, after a confirmation, adds its
words to Names and vocabulary. Snippets and deleted entries never come
in, a replacement counts only when it is a short term, one-word everyday
English words stay out (they echo like generic title words), words
already listed are skipped, and at most 40 words and 480 characters come
in, starred and most used first. Dictation history, audio and meetings
are not read. Tested with Wispr Flow 1.6.1483.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stevyhacker

Copy link
Copy Markdown
Owner

Nice idea, will review!

This branch has not been deployed

No deployments
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.

2 participants