Introducing a new way to review your PRs.

Read the announcement

altic-dev / fluidvoice

Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more

View on GitHub

24 documents · Updated Nov 23, 2026

docs / custom-dictionary-training

Custom dictionary training

Custom dictionary training lets FluidVoice learn the words and pronunciations that matter to one user. It stores correction rules and recognition terms locally, can move those rules between installations, and can turn repeated typing corrections into guided training suggestions. The feature links the Custom Dictionary page with speech capture, recognition, text insertion, and completed meeting turns so that later output uses the intended text.

Parent: Data, history, and personalization

Related pages:

Dictionary data model

The dictionary uses separate data types for text replacement, recognition help, and voice-specific pronunciation help. This separation lets a user correct a known mishearing without recording a voice profile, or improve recognition of a rare name without defining a replacement.

Replacement rules

Replacement rules map one or more heard forms to one replacement. FluidVoice applies these rules after dictation, so they control the text that appears in the target app. Rules keep a stable identifier and normalize trigger text for matching; matching respects each rule’s case setting and uses whole-word boundaries when a trigger starts or ends with a word character. The same literal rule contract also formats completed meeting turns, which keeps saved corrections consistent across live text and stored transcripts (Sources/…/DictionaryReplacementRule.swift• L3-59, Sources/…/MeetingTranscriptNormalizer.swift• L11-32). Intentional whitespace-only replacements can still insert a space, tab, or line break, while visible text is trimmed at its edges (Sources/…/SettingsStore.swift• L4493-4504, Sources/…/ASRService.swift• L5068-5097, Tests/…/CustomDictionaryManualEntryTests.swift• L7-22).

FluidVoice also ships a small built-in dictionary for common product and service names. Built-in entries stay out of the editable list, and a user entry with the same spelling takes precedence. User entries can also be case-sensitive, so the text path protects the exact-case choice without removing every built-in occurrence (Sources/…/BuiltInDictionary.swift• L3-20). The same replacement model supports the main dictionary page and the local dictionary API. A rule can therefore come from voice training, manual entry, an imported file, or a local client (Sources/…/DictionaryAPIController.swift• L3-41, Sources/…/DictionaryAPIController.swift• L109-160).

References: Sources/…/BuiltInDictionary.swift• L3-20 Sources/…/SettingsStore.swift• L4493-4504 Sources/…/ASRService.swift• L5068-5097 Sources/…/DictionaryReplacementRule.swift• L3-59 Sources/…/MeetingTranscriptNormalizer.swift• L11-32 Sources/…/DictionaryAPIController.swift• L3-41 Sources/…/DictionaryAPIController.swift• L109-160 Tests/…/CustomDictionaryManualEntryTests.swift• L7-22

Recognition words

Recognition words give the Parakeet speech engine extra help for names, products, and other uncommon terms. A word can have aliases for forms that the engine may hear, while the final term remains the text that recognition should favor. These terms improve recognition; they do not by themselves create a post-dictation replacement (Sources/…/ParakeetVocabularyStore.swift• L11-20, Sources/…/ParakeetVocabularyStore.swift• L195-274).

FluidVoice keeps saved recognition words separate from deterministic replacement rules when it prepares the active vocabulary. It removes empty and duplicate terms, keeps the user-facing word list separate from engine tuning, and sends the active set to Parakeet only when boosting is enabled. Basic instant replacements remain post-recognition rules rather than becoming fuzzy vocabulary candidates (Sources/…/ParakeetVocabularyStore.swift• L212-244, Tests/…/CustomDictionaryManualEntryTests.swift• L24-42).

References: Sources/…/ParakeetVocabularyStore.swift• L11-20 Sources/…/ParakeetVocabularyStore.swift• L143-209 Sources/…/ParakeetVocabularyStore.swift• L212-244 Sources/…/ParakeetVocabularyStore.swift• L195-274 Tests/…/CustomDictionaryManualEntryTests.swift• L24-42

Pronunciation profiles

Pronunciation profiles capture how a user says a replacement. A profile belongs to a replacement entry and a speech model, so a voice sample is not treated as valid for every model. The profile keeps compatible enrollment samples and rejects samples that do not share the same model and embedding shape (Sources/…/PronunciationDictionaryStore.swift• L3-39, Sources/…/PronunciationDictionaryStore.swift• L141-223).

Profiles can retain saved inspection data and, when the user permits it, bounded original audio from automatic learning. The store writes evidence before it activates the profile and removes inactive or orphaned evidence later. This keeps an interrupted save from creating a partial active profile (Sources/…/PronunciationDictionaryStore.swift• L161-223, Sources/…/PronunciationDictionaryStore.swift• L361-447, Sources/…/PronunciationDictionaryStore.swift• L488-538).

Matching uses compatible enrollments as separate references. It can use an exact model or a compatible model family, but it rejects outdated or incompatible references (Sources/…/PronunciationDictionaryReferences.swift• L12-39, Sources/…/PronunciationDictionaryStore.swift• L108-129). Editing the replacement text discards its profile, while a label-only update keeps the profile tied to the current dictionary entry (Sources/…/CustomDictionaryView.swift• L363-385).

References: Sources/…/PronunciationDictionaryStore.swift• L3-39 Sources/…/PronunciationDictionaryStore.swift• L108-129 Sources/…/PronunciationDictionaryStore.swift• L141-223 Sources/…/PronunciationDictionaryStore.swift• L361-447 Sources/…/PronunciationDictionaryReferences.swift• L12-39 Sources/…/CustomDictionaryView.swift• L363-385

Dictionary storage and transfer

Dictionary data stays on the Mac and has separate storage boundaries. Normal replacement rules live in app settings, recognition words live in the Parakeet vocabulary store, and pronunciation profiles use their own local store. A single JSON export moves replacement rules and recognition words, but it does not move voice recordings or pronunciation profiles.

Local persistence

Replacement rules are encoded in the app's settings store. Recognition words use a JSON file under the app's Application Support folder. Pronunciation profiles use a separate versioned JSON file in the same app area. Saved inspection records and optional automatic-learning audio remain local evidence linked from a profile (Sources/…/SettingsStore.swift• L4498-4513, Sources/…/ParakeetVocabularyStore.swift• L87-124, Sources/…/PronunciationDictionaryStore.swift• L68-92, Sources/…/PronunciationDictionaryStore.swift• L261-276).

Each store has a different recovery boundary. Invalid or missing replacement and pronunciation data falls back to an empty set, while invalid vocabulary input is reported to the caller. A successful change signals the recognition system to refresh its active dictionary. Pronunciation work also uses entry and generation checks so a late background result cannot overwrite a newer edit (Sources/…/PronunciationDictionaryStore.swift• L141-159, Sources/…/PronunciationDictionaryStore.swift• L347-375, Sources/…/ParakeetVocabularyStore.swift• L127-141).

References: Sources/…/SettingsStore.swift• L4498-4513 Sources/…/ParakeetVocabularyStore.swift• L87-141 Sources/…/PronunciationDictionaryStore.swift• L68-92 Sources/…/PronunciationDictionaryStore.swift• L141-159 Sources/…/PronunciationDictionaryStore.swift• L261-276 Sources/…/PronunciationDictionaryStore.swift• L347-375

Import and export

The transfer service creates one JSON document with replacement rules and custom words. Replacement entries preserve case sensitivity, and custom words can carry their recognition weight. The reader accepts older field shapes and both scalar and list spellings, then writes a normalized form (Sources/…/DictionaryTransferService.swift• L3-67, Sources/…/DictionaryTransferService.swift• L69-169, Sources/…/DictionaryTransferService.swift• L245-265).

Import offers two clear modes:

  • Merge keeps current entries and combines matching replacement targets and triggers. It keeps existing custom words and adds new ones.
  • Replace clears current replacement rules and custom words before adding the imported values.

The service removes empty values and duplicates during transfer. It preserves intentional whitespace-only replacement values while trimming surrounding whitespace from visible replacement text. Imported custom words use a default weight when none is present and are capped at the supported list size. It also invalidates the text-replacement cache and notifies the recognition path after a restore, so the imported dictionary takes effect without waiting for a restart (Sources/…/DictionaryTransferService.swift• L236-285, Sources/…/DictionaryTransferService.swift• L293-437, Sources/…/SettingsStore.swift• L4499-4504, Tests/…/CustomDictionaryManualEntryTests.swift• L57-108). The Custom Dictionary page owns the file picker and asks the user to choose Merge or Replace before it changes local data (Sources/…/CustomDictionaryView.swift• L2808-2877).

The transfer boundary is intentional: exported data contains replacement rules and custom words only. A user who moves a dictionary to another Mac must record pronunciation profiles again because those profiles depend on the local speech model and voice samples.

References: Sources/…/DictionaryTransferService.swift• L3-67 Sources/…/DictionaryTransferService.swift• L69-169 Sources/…/DictionaryTransferService.swift• L210-285 Sources/…/DictionaryTransferService.swift• L293-437 Sources/…/CustomDictionaryView.swift• L2808-2877 Tests/…/CustomDictionaryManualEntryTests.swift• L57-108

Training and correction learning

Training has a direct path and an automatic path. Direct training starts from the Custom Dictionary page, where the composer now lets the user choose Train by Voice or Add Manually. Automatic learning watches the text that FluidVoice inserts and offers help only when a correction looks real and useful. Both paths can add trigger forms to one replacement rule; voice training can also add a local pronunciation profile (Sources/…/CustomDictionaryView.swift• L634-708, Sources/…/CustomDictionaryView.swift• L747-805).

Guided voice training

The user enters the intended replacement and presses Start once. FluidVoice detects each spoken sample, shows the heard forms, and listens again automatically after speech ends. The flow needs three covered captures before it enables save; when pronunciation matching is active, those captures also build a voice profile. When it is off, the flow saves spelling corrections without voice enrollment (Sources/…/CustomDictionaryView.swift• L919-1006, Sources/…/CustomDictionaryView.swift• L2305-2457, Sources/…/CustomDictionaryView.swift• L2470-2532). Captured aliases are filtered so broad basic words do not become unsafe automatic replacements unless the user confirms them (Sources/…/VoiceTrainingAliasFilter.swift• L3-41).

The wizard separates the spelling step, recording step, review step, and saved-word test. The user can add or remove captured spellings, record more examples, redo the current recordings, or switch to manual entry. The saved-word test uses normal shortcut dictation only for the focused test editor, so it checks the word without inserting unrelated dictation into the field (Sources/…/DictionaryWordWizard.swift• L4-16, Sources/…/DictionaryWordWizard.swift• L125-153, Sources/…/DictionaryWordWizard.swift• L766-875).

The flow moves through capture, speech-end detection, transcription, coverage checks, and save. This diagram shows how one recorded sample becomes either another training attempt or a stored dictionary update.

flowchart LR
    A[Intended replacement] --> B[Record speech]
    B --> C[Detect speech end]
    C --> D[Transcribe sample]
    D --> E{Covers intended word or saved variant?}
    E -- No --> F[Show variant and continue]
    E -- Yes --> G[Advance readiness]
    F --> B
    G --> H{Three covered captures?}
    H -- No --> B
    H -- Yes --> I[Save spelling rule]
    I --> J{Pronunciation matching enabled?}
    J -- Yes --> K[Save voice profile]
    J -- No --> L[Refresh text recognition]
    K --> L

References: Sources/…/CustomDictionaryView.swift• L634-708 Sources/…/CustomDictionaryView.swift• L747-805 Sources/…/CustomDictionaryView.swift• L919-1006 Sources/…/CustomDictionaryView.swift• L2305-2457 Sources/…/CustomDictionaryView.swift• L2470-2532 Sources/…/VoiceTrainingAliasFilter.swift• L3-41 Sources/…/DictionaryWordWizard.swift• L4-16 Sources/…/DictionaryWordWizard.swift• L125-153 Sources/…/DictionaryWordWizard.swift• L766-875

Automatic correction suggestions

Automatic learning begins after FluidVoice inserts dictated text into a readable, non-secure text field. The tracker anchors the inserted range through macOS accessibility events, follows edits that remain inside that range, and waits for a completion signal such as a focus or selection change. The detector turns the accumulated edit into a candidate only when it stays inside the inserted range and looks like one meaningful word correction; it rejects broad, weak, or ambiguous edits (Sources/…/AutomaticDictionaryCorrectionTracker.swift• L214-241, Sources/…/AutomaticDictionaryCorrectionTracker.swift• L252-377, Sources/…/AutomaticDictionaryCorrectionDetector.swift• L33-127, Sources/…/AutomaticDictionaryCorrectionTracker.swift• L384-429, Sources/…/AutomaticDictionaryCorrectionTracker.swift• L502-579).

The tracker uses configured completion and inactivity delays. A real selection move can reschedule evaluation based on whether the selection touches the candidate, while repeated selection notifications that report the same caret position do not postpone the existing deadline. This keeps editors that emit duplicate accessibility events from delaying a valid suggestion (Sources/…/AutomaticDictionaryCorrectionTracker.swift• L191-201, Sources/…/AutomaticDictionaryCorrectionTracker.swift• L344-363).

The suggestion policy remembers heard-to-corrected pairs and counts recent occurrences that lead to the same corrected text. It applies a cooldown to dismissed pairs, limits ignored prompts within the current session, and prunes old local state. An accepted or ignored pair stops future suggestions for that pair (Sources/…/AutomaticDictionaryCorrectionTracker.swift• L5-12, Sources/…/AutomaticDictionaryCorrectionTracker.swift• L63-151).

When a voice match changes a delivered word to a saved replacement, the voice spelling learner can propose the new spelling as a text trigger. It waits up to two minutes for confirmation, saves only if the user keeps the replacement and the same dictionary entry still exists, and drops the proposal if the user edits the word, the source recording is no longer observable, or dictation is still active. It rejects the original word, common words, and spellings already claimed by another rule. This turns a successful voice match into a faster text correction without changing the pronunciation profile (Sources/…/DictionaryVoiceSpellingLearner.swift• L3-12, Sources/…/DictionaryVoiceSpellingLearner.swift• L47-128).

When a suggestion appears, the user can save the correction, enter the voice-training flow, or confirm that a pronunciation match was wrong when negative learning is enabled. A correction save can also queue approved audio evidence for pronunciation learning. The automatic training session owns these choices and protects saves with entry, profile, expiry, and feature-generation checks (Sources/…/AutomaticDictionaryTrainingSession.swift• L189-258, Sources/…/AutomaticDictionaryTrainingSession.swift• L479-508).

References: Sources/…/AutomaticDictionaryCorrectionTracker.swift• L5-12 Sources/…/AutomaticDictionaryCorrectionTracker.swift• L63-151 Sources/…/AutomaticDictionaryCorrectionTracker.swift• L191-201 Sources/…/AutomaticDictionaryCorrectionTracker.swift• L214-241 Sources/…/AutomaticDictionaryCorrectionTracker.swift• L252-377 Sources/…/AutomaticDictionaryCorrectionDetector.swift• L23-127 Sources/…/AutomaticDictionaryCorrectionTracker.swift• L384-429 Sources/…/AutomaticDictionaryCorrectionTracker.swift• L502-579 Sources/…/DictionaryVoiceSpellingLearner.swift• L3-12 Sources/…/DictionaryVoiceSpellingLearner.swift• L47-128 Sources/…/AutomaticDictionaryTrainingSession.swift• L189-258 Sources/…/AutomaticDictionaryTrainingSession.swift• L479-508

Learning evidence

Automatic learning keeps a short-lived link between the text edit and the original speech. The evidence resolver maps the selected corrected text back to one spoken occurrence by using word timing and nearby unchanged context. It rejects expired recordings, invalid selections, ambiguous repeated text, and invalid timing (Sources/…/DictionaryLearningEvidence.swift• L19-71, Sources/…/DictionaryLearningEvidence.swift• L84-124, Sources/…/DictionaryLearningEvidence.swift• L144-238).

Approved evidence can provide optional background audio for pronunciation learning. The audio is bounded and independent from the text correction result, so failure to extract or save the audio does not block the text rule (Sources/…/PronunciationDictionaryStore.swift• L361-447).

References: Sources/…/DictionaryLearningEvidence.swift• L19-71 Sources/…/DictionaryLearningEvidence.swift• L84-124 Sources/…/DictionaryLearningEvidence.swift• L144-238 Sources/…/PronunciationDictionaryStore.swift• L361-447

Negative examples

Negative learning records a confirmed wrong pronunciation match as a separate, removable set of bounded speech features. It stores no PCM or transcript and never creates a match by itself. During matching, a close negative can veto an otherwise accepted positive match (Sources/…/DictionaryNegativeExamples.swift• L25-63, Sources/…/DictionaryNegativeExamples.swift• L66-126, Sources/…/DictionaryExperimentalMatcher.swift• L149-157).

The system accepts a negative example only when the delivered utterance is unchanged and the selected spoken occurrence is unique. Profile changes, model changes, retraining, and matcher changes invalidate the link (Sources/…/DictionaryNegativeExamples.swift• L30-51, Sources/…/DictionaryNegativeExamples.swift• L54-63).

References: Sources/…/DictionaryNegativeExamples.swift• L25-63 Sources/…/DictionaryNegativeExamples.swift• L66-126 Sources/…/DictionaryExperimentalMatcher.swift• L149-157

Endpoint detection and monitoring

Endpoint detection decides when a training recording has ended. It prevents the user from needing to press Stop after every word, while preserving manual stop as a fallback. The monitor reads audio from the active dictionary-training capture and sends speech-end events back to the training session.

Speech boundary detection

The endpoint detector uses voice activity detection, which means it looks for a speech start followed by a speech end rather than stopping on silence before speech begins. It processes fixed audio chunks and isolates each run with a session identifier, so old audio or an old capture cannot end a new recording (Sources/…/DictionaryTrainingEndpointDetector.swift• L6-16, Sources/…/DictionaryTrainingEndpointDetector.swift• L29-71).

The detector is prepared before the training screen needs it. If preparation fails, the training flow remains usable with explicit user control. The monitor also applies a maximum capture duration, so a missing speech-end event cannot leave a recording open indefinitely (Sources/…/DictionaryTrainingEndpointMonitor.swift• L90-121, Sources/…/DictionaryTrainingEndpointMonitor.swift• L139-155).

References: Sources/…/DictionaryTrainingEndpointDetector.swift• L6-16 Sources/…/DictionaryTrainingEndpointDetector.swift• L29-71 Sources/…/DictionaryTrainingEndpointMonitor.swift• L90-121 Sources/…/DictionaryTrainingEndpointMonitor.swift• L139-155

Capture monitoring

The endpoint monitor follows the active ASR capture and reads audio only while dictionary training is running. It tracks the audio generation so a restarted capture begins at the correct position. When it receives speech end, it stops the sample and lets the training session transcribe and judge it (Sources/…/DictionaryTrainingEndpointMonitor.swift• L39-56, Sources/…/DictionaryTrainingEndpointMonitor.swift• L124-211).

The training session stops the monitor before it stops ASR and starts it again for the next automatic sample. It also stops monitoring when the user cancels, changes the training mode, leaves the page, or disables pronunciation learning. Capture tokens and feature generations prevent a late callback from acting on a closed or unrelated capture (Sources/…/AutomaticDictionaryTrainingSession.swift• L261-299, Sources/…/AutomaticDictionaryTrainingSession.swift• L301-420, Sources/…/CustomDictionaryView.swift• L2305-2447, Sources/…/CustomDictionaryView.swift• L2684-2705).

References: Sources/…/DictionaryTrainingEndpointMonitor.swift• L39-56 Sources/…/DictionaryTrainingEndpointMonitor.swift• L124-211 Sources/…/AutomaticDictionaryTrainingSession.swift• L261-299 Sources/…/AutomaticDictionaryTrainingSession.swift• L301-420 Sources/…/CustomDictionaryView.swift• L2305-2447 Sources/…/CustomDictionaryView.swift• L2684-2705

Pronunciation matching and monitoring

Pronunciation matching compares a current speech window with saved voice references after normal speech recognition. Text rules get the first claim on words, so voice matching can correct a remaining spoken word without replacing text that a deterministic rule already covers. Matching uses compatible references, separate model-generation state, and optional diagnostic evidence.

Reference preparation

The active speech provider loads eligible profiles for the current dictionary and model. It prepares temporal references outside the recording path, then uses those references during matching. The reference builder keeps each enrollment separate or uses a calibrated edge reference when the profile supports it (Sources/…/DictionaryPronunciationReferences.swift• L4-39, Sources/…/DictionaryExperimentalMatcher.swift• L121-141).

The shared pronunciation matcher is controlled by one master setting. Positive matching is on by default, while negative collection, negative comparison, and debug audio capture are separate opt-in behaviors (Sources/…/DictionaryExperimentalMatcher.swift• L3-24, Sources/…/DictionaryPronunciationExperiment.swift• L3-7). The Custom Dictionary experience exposes pronunciation matching as Basic or Advanced when the selected model supports it. Advanced matching is marked as a research preview and requires Parakeet TDT on Apple Silicon. Turning the master setting off stops new pronunciation evidence and invalidates active training work without removing text corrections (Sources/…/CustomDictionaryView.swift• L904-910, Sources/…/CustomDictionaryView.swift• L2955-2967, Sources/…/CustomDictionaryView.swift• L2970-3003, Sources/…/CustomDictionaryView.swift• L3016-3066, Sources/…/DictionaryMatcherExperimentSettings.swift• L3-20, Sources/…/AutomaticDictionaryTrainingSession.swift• L48-50).

References: Sources/…/DictionaryPronunciationReferences.swift• L4-39 Sources/…/DictionaryExperimentalMatcher.swift• L3-24 Sources/…/DictionaryExperimentalMatcher.swift• L121-141 Sources/…/DictionaryPronunciationExperiment.swift• L3-7 Sources/…/CustomDictionaryView.swift• L904-910 Sources/…/CustomDictionaryView.swift• L2955-2967 Sources/…/CustomDictionaryView.swift• L2970-3003 Sources/…/CustomDictionaryView.swift• L3016-3066 Sources/…/DictionaryMatcherExperimentSettings.swift• L3-20 Sources/…/AutomaticDictionaryTrainingSession.swift• L48-50

Audio span selection

The matcher first marks transcript words already covered by saved triggers, replacements, or built-in entries. It then searches the remaining nearby words for a whole span that resembles a saved pronunciation target. This prevents an audio match from overwriting text that the text dictionary already owns (Sources/…/DictionaryAudioSpan.swift• L20-38).

The stamp matcher searches for a saved pronunciation inside a full sentence. It accepts a strong sound match directly and requires written resemblance for a less certain match. It returns only bounded, non-overlapping candidate spans (Sources/…/DictionaryStampMatcher.swift• L4-18, Sources/…/DictionaryStampMatcher.swift• L39-52, Sources/…/DictionaryStampMatcher.swift• L110-127).

References: Sources/…/DictionaryAudioSpan.swift• L20-38 Sources/…/DictionaryAudioSpan.swift• L76-96 Sources/…/DictionaryStampMatcher.swift• L4-18 Sources/…/DictionaryStampMatcher.swift• L39-52 Sources/…/DictionaryStampMatcher.swift• L110-127

Replay diagnostics

The pronunciation test uses the current focused textbox attempt as its primary input. It can also load an older recording from transcription history, report whether the word is eligible, and let the user change the per-word match level for later dictation (Sources/…/DictionaryShortcutTestState.swift• L3-50, Sources/…/DictionaryMatchDiagnosticsView.swift• L27-83, Sources/…/DictionaryMatchDiagnosticsView.swift• L125-205).

The audio inspection view compares the test with each saved recording, plays the full recording or the selected trained cut, and shows a waveform and word timing. Changing a cut changes only the displayed scores; it does not change saved examples or production match behavior (Sources/…/DictionaryAudioInspectionView.swift• L78-135, Sources/…/DictionaryAudioInspectionView.swift• L159-175, Sources/…/DictionaryAudioInspectionView.swift• L244-319). Optional debug capture is local, bounded, and controlled separately from pronunciation matching (Sources/…/DictionaryPronunciationExperiment.swift• L113-186).

References: Sources/…/DictionaryShortcutTestState.swift• L3-50 Sources/…/DictionaryShortcutTestState.swift• L82-97 Sources/…/DictionaryMatchDiagnosticsView.swift• L27-83 Sources/…/DictionaryMatchDiagnosticsView.swift• L125-205 Sources/…/DictionaryAudioInspectionView.swift• L78-135 Sources/…/DictionaryAudioInspectionView.swift• L159-175 Sources/…/DictionaryAudioInspectionView.swift• L244-319 Sources/…/DictionaryPronunciationExperiment.swift• L113-186

Custom dictionary experience

The Custom Dictionary page presents correction rules, recognition help, spoken formatting, and voice training as one user task: teach FluidVoice what a word should sound like and what text or action it should produce. The main composer offers Train by Voice for guided capture and Add Manually for a known mistake. A searchable dictionary drawer provides quick access to saved entries, import, export, and advanced custom-word controls (Sources/…/CustomDictionaryView.swift• L476-608, Sources/…/CustomDictionaryView.swift• L634-805, Sources/…/CustomDictionaryView.swift• L1120-1469).

Dictionary editing

The Your Dictionary area provides a searchable list of saved replacements. It lets the user add a known correction, test or modify an entry, import or export portable rules, and delete a word. Editing a replacement updates or removes the linked pronunciation profile so the profile cannot describe a different target (Sources/…/CustomDictionaryView.swift• L476-608, Sources/…/CustomDictionaryView.swift• L1120-1293, Sources/…/CustomDictionaryView.swift• L363-385, Sources/…/CustomDictionaryView.swift• L2896-2913).

The Custom Words area manages recognition terms and priority for Parakeet when word boosting is enabled. It supports mild, balanced, and strong priority levels. These terms are useful for rare names and products, but the page warns that boosting can favor a similar word when the user meant something else (Sources/…/CustomDictionaryView.swift• L1317-1375, Sources/…/CustomDictionaryView.swift• L1377-1539, Sources/…/CustomDictionaryView.swift• L3792-3829).

References: Sources/…/CustomDictionaryView.swift• L476-608 Sources/…/CustomDictionaryView.swift• L634-805 Sources/…/CustomDictionaryView.swift• L1120-1293 Sources/…/CustomDictionaryView.swift• L1317-1375 Sources/…/CustomDictionaryView.swift• L1377-1539 Sources/…/CustomDictionaryView.swift• L363-385 Sources/…/CustomDictionaryView.swift• L2896-2913 Sources/…/CustomDictionaryView.swift• L3792-3829

Spoken formatting

Spoken Formatting is a separate experience on the same page. It uses a start word to protect normal speech, then maps user-defined phrases to punctuation or fixed formatting actions such as a new line. The user can enable or disable the feature, edit action phrases, add punctuation rules, and reset its defaults (Sources/…/CustomDictionaryView.swift• L1169-1223, Sources/…/CustomDictionaryView.swift• L1542-1647, Sources/…/CustomDictionaryView.swift• L1693-1819).

The feature keeps its rules saved when disabled, but does not apply them to dictated text until the user enables it. Formatting actions need at least one spoken phrase before they can run (Sources/…/CustomDictionaryView.swift• L1650-1691, Sources/…/CustomDictionaryView.swift• L1761-1795).

References: Sources/…/CustomDictionaryView.swift• L1169-1223 Sources/…/CustomDictionaryView.swift• L1542-1647 Sources/…/CustomDictionaryView.swift• L1650-1691 Sources/…/CustomDictionaryView.swift• L1693-1819 Sources/…/CustomDictionaryView.swift• L1761-1795

Local dictionary interfaces

The app exposes replacement rules and custom words through local HTTP endpoints for trusted local tools. Each resource supports reading the current list and writing one entry or a list, with append and replace modes. Writes normalize the data and trigger the same recognition refresh used by the UI (Sources/…/DictionaryAPIController.swift• L109-190).

The local API does not provide pronunciation-profile transfer. Voice-specific training remains tied to the app's local profile store and the selected speech model, while API clients can manage the text rules and recognition terms that are portable through the dictionary transfer format.

References: Sources/…/DictionaryAPIController.swift• L109-190 Sources/…/DictionaryAPIController.swift• L218-239 Sources/…/DictionaryTransferService.swift• L240-279

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the three dictionary layers aligned: built-in and saved text rules claim words before audio matching; custom words affect Parakeet boosting; pronunciation profiles point to the replacement entry's identifier. Apply the same saved replacement rule to live dictation and completed meeting turns.
  • Preserve the transfer boundary when adding fields. Portable replacement and custom-word data must remain readable by import, while voice profiles need a model-compatible transfer design before they can be moved.
  • Keep transfer compatibility for old field names and scalar or list values. Preserve case-sensitive replacement intent and custom-word weights when data moves between the file, UI, and local API.
  • Keep all dictionary write paths consistent. UI saves, local API writes, and imports must normalize duplicates and invalid values while preserving intentional whitespace-only replacements. They must also refresh the active recognition data.
  • Keep the two composer paths aligned. Train by Voice must preserve capture and pronunciation state, while Add Manually must preserve trigger, replacement, case, and duplicate checks.
  • Keep automatic correction tracking anchored to the inserted field range. A correction must not be inferred from a secure field, an unrelated edit, or a stale accessibility event.
  • Keep correction detection narrow. It must reject edits outside the inserted range and broad or weak text changes before the suggestion policy sees them.
  • Keep automatic suggestion delays tied to the configured completion and inactivity settings. Repeated selection notifications for the same caret must not extend the deadline, while a real selection move must still update candidate evaluation.
  • Keep voice-spelling proposals separate from confirmed text corrections. They must expire, be cancelled after an edit or lost recording, and write only when the matching entry still has the same identity and label.
  • If automatic audio learning changes, keep its short lifetime, bounded evidence, model-generation checks, and entry revision checks separate from the text correction result.
  • If pronunciation matching changes, keep reference preparation compatible with the active model and keep background cache misses out of the live recording path.
  • If ASR capture state or audio generation changes, verify that endpoint monitoring cannot read stale audio or stop a later training sample. Keep the maximum capture deadline and manual stop path.
  • If replacement editing changes identity or target text, update the profile discard and relabel rules at the same time.
  • Keep negative examples separate from positive enrollments and invalidate them when the profile label, model, enrollment set, or matcher generation changes.
  • Keep the spoken-formatting start word, action aliases, punctuation rules, and enable state aligned so a saved phrase cannot silently stop working or affect ordinary speech.
  • Keep debug audio capture opt-in and bounded. Turning it off must prevent new local PCM, embeddings, or reports from being written.

Important failure modes

TriggerConsequenceGuard
A pronunciation sample uses a different model or embedding sizeThe voice profile cannot be saved or restoredValidate every enrollment against the profile model and size before persistence (Sources/…/PronunciationDictionaryStore.swift• L141-152)
A replacement target is renamedThe old pronunciation profile no longer describes the saved ruleDiscard the profile when the replacement text changes and update only its label for a label-only edit (Sources/…/CustomDictionaryView.swift• L363-385)
Live dictation and completed meeting turns use different replacement boundariesThe same saved correction produces different text in live output and stored meeting textCompile and apply the shared literal replacement rule in both output paths (Sources/…/DictionaryReplacementRule.swift• L13-59, Sources/…/MeetingTranscriptNormalizer.swift• L11-32)
An audio match claims text already covered by a saved or built-in ruleA fuzzy voice match can undo a deterministic correctionMark text-owned spans before searching for an audio span (Sources/…/DictionaryAudioSpan.swift• L20-38)
A replacement path treats an intentional whitespace-only value as emptyA command such as “new line” loses its formatting effectTrim visible text but preserve an all-whitespace payload (Sources/…/SettingsStore.swift• L4499-4504, Tests/…/CustomDictionaryManualEntryTests.swift• L7-22)
The endpoint detector cannot prepare, loses the active capture, or reaches its deadlineAutomatic stop does not occur, or a stale callback could affect trainingTie monitoring to the ASR capture token and keep explicit Stop plus a maximum duration (Sources/…/DictionaryTrainingEndpointMonitor.swift• L124-155, Sources/…/AutomaticDictionaryTrainingSession.swift• L375-399)
Accessibility cannot read the focused field or the field is secureAutomatic correction tracking cannot produce a candidateRequire a readable focused element and reject secure text inputs (Sources/…/AutomaticDictionaryCorrectionTracker.swift• L397-429, Sources/…/AutomaticDictionaryCorrectionTracker.swift• L590-602)
A user edit spans multiple words or leaves the inserted rangeAn unrelated edit can become a false training suggestionRequire an in-range, single-word, meaningful candidate before applying suggestion policy (Sources/…/AutomaticDictionaryCorrectionDetector.swift• L69-127, Sources/…/AutomaticDictionaryCorrectionDetector.swift• L211-237)
An editor repeats the same selection notificationA valid correction prompt is delayed by extending its deadlineCompare the new selection with the last observed selection before changing the pending-candidate timer (Sources/…/AutomaticDictionaryCorrectionTracker.swift• L344-363)
A voice-spelling proposal is confirmed after the user edits the delivered wordA new trigger can describe a wrong matchCancel proposals on edits and commit only the same current entry and label (Sources/…/DictionaryVoiceSpellingLearner.swift• L71-119)
Imported JSON has empty or duplicate valuesInvalid rules could override useful entries or produce unclear outputNormalize and discard empty values before restore while retaining valid whitespace-only replacements (Sources/…/DictionaryTransferService.swift• L293-350, Tests/…/CustomDictionaryManualEntryTests.swift• L95-108)
An imported custom word has no weight or exceeds the supported list sizeThe word can receive the wrong priority or fail to enter the active vocabularyApply the import default and enforce the transfer limit (Sources/…/DictionaryTransferService.swift• L236-241, Sources/…/DictionaryTransferService.swift• L306-318)
A word is saved without recognition boosting enabledThe term has no effect on Parakeet recognitionGate the Custom Words editor and active vocabulary on the boosting setting (Sources/…/CustomDictionaryView.swift• L1346-1375, Sources/…/ParakeetVocabularyStore.swift• L180-209)
Automatic audio learning finishes after an entry or feature generation changedOld audio can attach to a new spelling or an inactive experimentBound requests and validate the entry, revision, and generation before commit (Sources/…/PronunciationDictionaryStore.swift• L361-388)
A user confirms a wrong match after the source text is changed, repeated, or expiredA negative example describes the wrong spoken occurrenceRequire one unchanged, unique, unexpired source occurrence before saving (Sources/…/DictionaryNegativeExamples.swift• L30-51)
A saved profile uses an outdated model revisionVoice matching stops for that profile while text corrections remain availableReject outdated model references and show retraining guidance (Sources/…/PronunciationDictionaryStore.swift• L51-64, Sources/…/CustomDictionaryView.swift• L341-354)

Key files

FileWhy to read it
Sources/…/CustomDictionaryView.swiftShows the user-facing training composer, searchable dictionary drawer, spoken-formatting editor, import, export, custom-word controls, and capability flows.
Sources/…/DictionaryWordWizard.swiftShows the word-training steps, review actions, retry path, saved-word test, and focused-field dictation boundary.
Sources/…/AutomaticDictionaryCorrectionTracker.swiftConnects inserted text changes to correction candidates, configured completion timing, and suggestion policy.
Sources/…/AutomaticDictionaryCorrectionDetector.swiftDefines the narrow text-change rules that turn an in-range edit into a correction candidate.
Sources/…/AutomaticDictionaryTrainingSession.swiftConnects automatic suggestions to voice training, positive saves, and wrong-match reports.
Sources/…/DictionaryVoiceSpellingLearner.swiftTurns a kept voice-match spelling into a later text trigger.
Sources/…/SettingsStore.swiftDefines the durable replacement-rule model and dictionary-related settings.
Sources/…/BuiltInDictionary.swiftDefines shipped text corrections and their precedence relative to user entries.
Sources/…/DictionaryReplacementRule.swiftDefines the shared literal replacement behavior, boundaries, case handling, and formatting protection used by live dictation and completed meeting turns.
Sources/…/DictionaryTransferService.swiftDefines the portable JSON format, compatibility rules, normalization, custom-word weights, and Merge or Replace behavior.
Sources/…/PronunciationDictionaryStore.swiftDefines local voice-profile storage, original-audio evidence, inspection records, and validity rules.
Sources/…/DictionaryLearningEvidence.swiftMaps an edited delivered phrase back to the exact spoken word and audio range.
Sources/…/DictionaryNegativeExamples.swiftDefines wrong-match confirmation and the separate bounded negative-example store.
Sources/…/DictionaryAudioSpan.swiftDefines the boundary between text-owned words and words eligible for audio matching.
Sources/…/DictionaryStampMatcher.swiftFinds saved pronunciation spans inside a full dictation.
Sources/…/DictionaryExperimentalMatcher.swiftDefines positive and negative pronunciation decisions and their feature-generation contract.
Sources/…/DictionaryPronunciationReferences.swiftConverts compatible enrollments into references used for matching.
Sources/…/DictionaryTrainingEndpointMonitor.swiftConnects live training audio to speech-end events and capture deadlines.
Sources/…/DictionaryMatchDiagnosticsView.swiftProvides current-recording checks, match-level controls, and history replay.
Sources/…/DictionaryAudioInspectionView.swiftProvides waveform, playback, and saved-training-cut inspection.
Sources/…/DictionaryAPIController.swiftExposes local read and write access for replacement rules and custom words.