Perch is a fork of esi-dictate. It replaces Deepgram with NVIDIA Parakeet through parakeet-mlx, so speech recognition runs on the local Apple Silicon machine.
Audio stays on the machine. Optional LLM cleanup can revise the current voice context after an utterance.
perch-dictate-start launches perch_server.py through uv run --script, which creates the Python environment on first use. The server reads the microphone in 100 ms blocks and segments speech with an energy threshold. While you speak, a Parakeet streaming decoder produces an interim transcript about once a second; Emacs shows it in perch-dictate-intermittent-face and replaces it on every update. When perch-dictate-utterance-end-ms of silence follows, the server runs a full offline decode over the whole utterance and Emacs replaces the interim text with that final result, then runs perch-dictate-speech-final-hook. On an M1 Max the streaming decode keeps up at roughly 0.25x real time and the final decode of a 24 s utterance takes under a second.
On macOS the first perch-dictate-start triggers the system microphone permission prompt for Emacs. While the prompt is open the server stays at the “loaded and warmed” status and does not become ready; allow access and start again.
- An Apple Silicon Mac.
- uv with Emacs 29.1 or newer.
- The first run downloads the selected model from Hugging Face. The default model uses about 1.3 GB.
Install Perch with use-package and its VC support.
(use-package perch-dictate
:vc (:url "https://github.com/nick-maderight/perch" :rev :newest)
:bind (:map perch-dictate-mode-map
("C-g" . perch-dictate-stop)))LLM cleanup is optional. Add an LLM provider and the final hook when you want automatic context cleanup.
(use-package llm)
(use-package llm-openai
:after llm
:demand t)
(use-package perch-dictate
:vc (:url "https://github.com/nick-maderight/perch" :rev :newest)
:custom
(perch-dictate-llm-provider
(make-llm-openai :key "<OPENAI-API-KEY>" :chat-model "gpt-4o-mini"))
:bind (:map perch-dictate-mode-map
("C-g" . perch-dictate-stop))
:config
(setq llm-warn-on-nonfree nil)
:hook (perch-dictate-speech-final . perch-dictate-fix-context))Run perch-dictate-start to start the server in the current buffer. End the server and remove the voice cursor with perch-dictate-stop. Use perch-dictate-toggle to start or stop dictation. Move the voice cursor with perch-dictate-move-here at point or across the active region. Send the current voice context to the configured LLM with perch-dictate-fix-context.
The voice cursor is separate from the keyboard point. Dictation inserts text at the voice cursor while you continue using the keyboard point. A selected region becomes the voice context, and Perch adds new transcript text at its end.
Set perch-dictate-model to another Parakeet repository when needed. Set perch-dictate-utterance-end-ms to change the silence duration that ends an utterance. Set perch-dictate-input-device to an input device name or leave it nil for the system default.
List available input devices with the standalone server.
uv run --script perch_server.py --list-devicesPass other server options through perch-dictate-server-args. Speech is detected when a block’s RMS level is at or above --threshold-db (default -45 dBFS); raise it toward -35 in a noisy room, lower it toward -55 for a quiet or distant microphone. --interim-ms sets how often interim text is refreshed (default 1000; smaller values cost proportionally more compute).
(setq perch-dictate-server-args '("--threshold-db" "-40"))Run the server with a fixture to inspect its JSON-line protocol.
uv run --script perch_server.py --input tests/resources/hello-world.wavRun the full ERT suite with make test. Run unit tests without the local-model integration test with make test-unit. Run the byte-compile check with make compile.
Perch uses the GPL-3 license. Abhinav Tushar wrote the original esi-dictate implementation.