|
1 | 1 | # Configuration |
2 | 2 |
|
3 | | -The basics — hold-to-talk, default key, changing the key — are in the [README quickstart](../README.md#quickstart). This page is the full reference: config file format, env var overrides, the PTT-key alias table, the recording indicator, and how services are laid out on Linux. |
| 3 | +The basics — hold-to-talk, default key, changing the key — are in the [README quickstart](../README.md#quickstart). This page is the full reference: config file format, custom dictionary corrections, env var overrides, the PTT-key alias table, the recording indicator, and how services are laid out on Linux. |
4 | 4 |
|
5 | 5 | ## Config file |
6 | 6 |
|
@@ -34,21 +34,66 @@ auto_paste = true |
34 | 34 | # a single pasteboard and the auto-paste flow already uses it. |
35 | 35 | write_clipboard = false |
36 | 36 |
|
| 37 | +# macOS: restore the previous clipboard contents after auto-pasting. |
| 38 | +# false = leave dictated text in the clipboard after paste. |
| 39 | +restore_clipboard_after_paste = true |
| 40 | + |
37 | 41 | # Drop fillers (uh, um, er, ah, erm, hmm) and collapse stuttered |
38 | 42 | # repetitions (`I I I think` → `I think`). |
39 | 43 | filter_filler_words = true |
40 | 44 | ``` |
41 | 45 |
|
| 46 | +## Custom dictionary |
| 47 | + |
| 48 | +utter's dictionary is a separate TOML file for correcting repeated |
| 49 | +speech-to-text mistakes. It is local-only and is reloaded on the next dictation, |
| 50 | +so dictionary edits do not require restarting utter. |
| 51 | + |
| 52 | +- Linux: `~/.config/utter/dictionary.toml` |
| 53 | +- macOS: `~/Library/Application Support/utter/dictionary.toml` |
| 54 | + |
| 55 | +Use the CLI on either platform: |
| 56 | + |
| 57 | +```bash |
| 58 | +utter dictionary add LUFS --replace luffs |
| 59 | +utter dictionary add AcmeCloud --replace "acme cloud" --replace "acme clout" |
| 60 | +utter dictionary list |
| 61 | +utter dictionary remove LUFS |
| 62 | +utter dictionary path |
| 63 | +``` |
| 64 | + |
| 65 | +Dictionary file format: |
| 66 | + |
| 67 | +```toml |
| 68 | +version = 1 |
| 69 | + |
| 70 | +[[entries]] |
| 71 | +term = "LUFS" |
| 72 | +replace = ["luffs"] |
| 73 | + |
| 74 | +[[entries]] |
| 75 | +term = "AcmeCloud" |
| 76 | +replace = ["acme cloud", "acme clout"] |
| 77 | +``` |
| 78 | + |
| 79 | +`term` is pasted exactly as written, including casing and punctuation. Each |
| 80 | +`replace` phrase is a heard-as transcription that should be rewritten to |
| 81 | +`term`; at least one `--replace` phrase is required when adding an entry. |
| 82 | +Matching is case-insensitive, Unicode-aware, phrase-boundary-aware, and |
| 83 | +non-recursive. Terms and replacement phrases are limited to 60 displayed |
| 84 | +characters. |
| 85 | + |
42 | 86 | ## Env var overrides |
43 | 87 |
|
44 | 88 | Every field above is overridable at runtime via an environment variable with the same name, upper-cased and prefixed `UTTER_` — e.g. `UTTER_AUTO_PASTE=0` wins over `auto_paste = true` in the file. Useful for one-off runs (`UTTER_AUTO_PASTE=0 utter daemon`) or systemd-drop-in tweaks without editing the file: |
45 | 89 |
|
46 | | -| Env var | Values | Overrides field | Purpose | |
47 | | -|-----------------------------|-----------|-----------------------|-------------------------------------------------------------------------| |
48 | | -| `UTTER_KEY` | name/code | `key` | PTT key. | |
49 | | -| `UTTER_AUTO_PASTE` | `0` / `1` | `auto_paste` | Synthesize the paste shortcut. | |
50 | | -| `UTTER_WRITE_CLIPBOARD` | `0` / `1` | `write_clipboard` | Also write the regular clipboard (Linux only). | |
51 | | -| `UTTER_FILTER_FILLER_WORDS` | `0` / `1` | `filter_filler_words` | Drop fillers (uh/um/er/ah/erm/hmm), collapse stutters. | |
| 90 | +| Env var | Values | Overrides field | Purpose | |
| 91 | +|----------------------------------------|-----------|-----------------------------------|-------------------------------------------------------------------------| |
| 92 | +| `UTTER_KEY` | name/code | `key` | PTT key. | |
| 93 | +| `UTTER_AUTO_PASTE` | `0` / `1` | `auto_paste` | Synthesize the paste shortcut. | |
| 94 | +| `UTTER_WRITE_CLIPBOARD` | `0` / `1` | `write_clipboard` | Also write the regular clipboard (Linux only). | |
| 95 | +| `UTTER_RESTORE_CLIPBOARD_AFTER_PASTE` | `0` / `1` | `restore_clipboard_after_paste` | Restore previous clipboard contents after macOS auto-paste. | |
| 96 | +| `UTTER_FILTER_FILLER_WORDS` | `0` / `1` | `filter_filler_words` | Drop fillers (uh/um/er/ah/erm/hmm), collapse stutters. | |
52 | 97 |
|
53 | 98 | These stay env-only (third-party tools, not utter's config): |
54 | 99 |
|
|
0 commit comments