Skip to content

feat: custom vocabulary for names and jargon - #169

Merged
jatinkrmalik merged 3 commits into
mainfrom
feat/custom-vocabulary
Jul 1, 2026
Merged

feat: custom vocabulary for names and jargon#169
jatinkrmalik merged 3 commits into
mainfrom
feat/custom-vocabulary

Conversation

@jatinkrmalik

@jatinkrmalik jatinkrmalik commented Jul 1, 2026

Copy link
Copy Markdown
Member

Requested in #24: a custom dictionary so names and jargon stop getting mangled by the model. Two users have now asked for it, and the common case is coworker or manager names ("Namrata" coming out as "Normada" or "Nam orda").

What this does

Adds a Custom Vocabulary text box in Settings > General. You type the terms that get mis-transcribed, one per line or comma-separated. VocaMac feeds them to WhisperKit as prompt context so it biases toward the right spelling.

How it works

The terms are parsed, framed as a "Glossary: ..." prompt, tokenized via whisperKit.tokenizer, and passed to DecodingOptions.promptTokens. WhisperKit trims to its own token budget and strips special tokens, so there is nothing to manage on our side.

One thing worth calling out for review: WhisperKit only applies promptTokens when usePrefillPrompt is true, and we were setting that flag only when the user picked an explicit language. So the vocabulary would have been silently dropped in auto-detect mode, which is the default. This PR forces the flag on whenever vocabulary is present.

Why a text field and not a config file

image

VocaMac keeps its files out of Documents and the home folder to avoid macOS permission prompts (see the model-storage note in WhisperService). A user-facing config file would bring that friction back, plus file watching and parse-error handling. A text field is discoverable and persists through @AppStorage like the rest of the settings.

Testing

Added unit tests for the term parsing (newline and comma split, trimming, dropping blanks). Build is green and all 34 tests pass.

Tested on local as well:
image

Adds a Custom Vocabulary field in Settings > General where users list names,
jargon, and proper nouns that get mis-transcribed. VocaMac encodes those terms
as WhisperKit prompt tokens so transcription leans toward the right spelling
(for example "Namrata" instead of "Normada").

WhisperKit only applies promptTokens when usePrefillPrompt is true, and that
flag was previously set only when an explicit language was chosen. This turns
it on whenever vocabulary is present, so terms are not ignored in auto-detect
mode.

Requested in #24.
@github-actions github-actions Bot added the app label Jul 1, 2026
Note that custom vocabulary works best when the terms match the dictation
language and the Transcription Language setting, and that in Auto-detect the
terms can influence which language is picked. Also drop the em dash and en
dash from the token-budget hint.
@jatinkrmalik

Copy link
Copy Markdown
Member Author

/build

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

PR Build started for 8171600

Build signed & notarized DMG... this usually takes 10–20 minutes.

Watch the build →

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

PR Build ready!

DMG VocaMac-0.6.2-pr.169+8171600-arm64.dmg
Size 6.1M
Branch feat/custom-vocabulary
Commit 8171600
Signed ✅ Developer ID
Notarized ✅ Apple

📥 Install

  1. Click the DMG link above to download
  2. Open the DMG and drag VocaMac to Applications (replace existing)
  3. Open VocaMac — No Gatekeeper warnings, no permission resets
SHA-256 checksum
28f3501dab8d9f1736367bed5d14343e01941e7a4da8c966fa2c06512fb5e29f  VocaMac-0.6.2-pr.169+8171600-arm64.dmg

💡 Comment /build or /build-quick to rebuild.

Swap the placeholder from "Namrata / Kubernetes / VocaMac" to a comma-separated
set of terms Whisper commonly mis-transcribes (kubectl, PostgreSQL, nginx,
Grafana), so the hint does not put someone's real name in the UI.
@jatinkrmalik

Copy link
Copy Markdown
Member Author

/build

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

PR Build started for 891bf13

Build signed & notarized DMG... this usually takes 10–20 minutes.

Watch the build →

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

PR Build ready!

DMG VocaMac-0.6.2-pr.169+891bf13-arm64.dmg
Size 6.1M
Branch feat/custom-vocabulary
Commit 891bf13
Signed ✅ Developer ID
Notarized ✅ Apple

📥 Install

  1. Click the DMG link above to download
  2. Open the DMG and drag VocaMac to Applications (replace existing)
  3. Open VocaMac — No Gatekeeper warnings, no permission resets
SHA-256 checksum
52b7ca07c4e2e797effaf9a9f459172628647769d8a00ea2c072215280b1c395  VocaMac-0.6.2-pr.169+891bf13-arm64.dmg

💡 Comment /build or /build-quick to rebuild.

@jatinkrmalik
jatinkrmalik merged commit e366f38 into main Jul 1, 2026
3 checks passed
jatinkrmalik added a commit that referenced this pull request Jul 2, 2026
* docs(web): document v0.7.0 features on the website

Adds website coverage for features shipped since v0.6.2 (audit found 4 of
5 uncovered; Homebrew was already fully covered, left untouched):

- New feature pages: Custom Vocabulary (#169) and Usage Statistics
  (#148/#168/#170), each with a landing-page grid card.
- Landing JSON-LD featureList: add custom vocabulary, local usage stats,
  and selectable audio input device (#156).
- Hotkey presets + custom recording (#139): fix stale "key combination"
  copy in fully-configurable.md, document the Record/custom-key capture
  and add the Right Control preset in push-to-talk.md, and update the FAQ.
- Audio input device (#156): expand fully-configurable.md (System Default,
  non-invasive pinning, auto-fallback on disconnect, Refresh Devices).
- Screenshots gallery: add a Stats tab entry.

Two screenshots still needed from a real capture (marked with SCREENSHOT
PLACEHOLDER comments): settings-stats.png and settings-vocabulary.png.
Verified with `hugo` (build succeeds; new pages render; JSON-LD valid).

* polish(web): refine features grid, fix mobile hero overflow, SEO pass

Features grid:
- Switch from a fixed 4-col grid (which left 2 orphan cards hanging and,
  via grid-auto-rows:1fr, forced every row to the tallest card's height)
  to a centered flex-wrap layout: uniform card heights, the short last
  row centers, and 4/2/1 columns at desktop/tablet/mobile.
- Apple-style polish: icon squircle tiles, tighter 1–2 line copy on every
  card, softer corners, refined heading type, gentler hover.

Mobile hero:
- The 380px mockup forced the hero column wider than small viewports,
  clipping the subtext/pills/buttons. Reset min-width and clip the
  decorative mockup so nothing overflows below ~420px.

SEO:
- og:type now "article" for content pages (was always "website").
- Enriched the home and features-list meta descriptions.
- Verified across all 18 pages: unique titles, one <h1> each, descriptions
  present, all <img> have alt, sitemap includes the new pages.

Screenshots: add settings-stats.png and settings-vocabulary.png (referenced
by the new feature pages) and refresh settings-general.png.
@jatinkrmalik
jatinkrmalik deleted the feat/custom-vocabulary branch August 22, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant