Dictation was silent even with a working server: avfoundation index 0 on
this machine is "Microsoft Teams Audio", a virtual driver that records
pure digital silence, and the device was hard-wired to ":0".
- resolve the input device on darwin by name instead of by index, since
indices shift as devices appear and disappear; prefer
live-dictate-device-name-pattern (built-in microphone) and skip
virtual/loopback drivers matched by live-dictate-ignore-device-name
- allow the device to be pinned either as a raw index (":2") or as a
regexp matched against the reported device names
- announce the selected device when dictation starts and name it in the
silence warning
- add `live-dictate-stop' as an explicit command (the keybinding stays a
toggle: SPC A d starts and stops)
- add `live-dictate-diagnose', which lists the devices, records two
seconds and reports whether the chosen one delivers audio or digital
silence (the latter means the OS microphone permission is missing)
config-mac.el stops pinning ":0" and documents the auto-selection.
Live dictation sent the OpenAI realtime protocol to ws://host/v1/realtime,
which only Lemonade-style servers implement. Against the local
whisper-server on port 13305 every connection failed with
"websocket-received-error-http-response 404".
Retarget the module at whisper.cpp's native POST /inference endpoint:
- capture 16 kHz mono PCM16 with FFmpeg (now with binary process coding,
which the old version lacked and which would have corrupted the audio)
- cut the stream into utterances with an energy-based VAD: speech starts
above live-dictate-silence-threshold, flushes after a configurable
silence window, with pre-roll and a max-utterance cap
- wrap each utterance in a WAV header and post it with curl, one request
at a time so transcripts are inserted in spoken order
- insert text at the dictation marker with correct spacing, keep the
mode-line indicator and follow-cursor behaviour
- warn when the microphone delivers pure digital silence (OS permission)
New defcustoms: live-dictate-language, -prompt, -silence-threshold,
-silence-duration, -min-utterance, -max-utterance, -preroll.
Comments in config-mac.el and packages.el updated; websocket is no
longer needed by dictation.
The human runs homebrew's whisper.cpp server with
ggml-large-v3-turbo; that build serves only whisper.cpp's native
/inference endpoint, not an OpenAI-compatible one. Switch the block
from 'openai to 'remote mode: whisper.el then POSTs multipart
(file, response_format=json, language) to <baseurl>/inference and
parses the {"text": ...} reply, which matches whisper.cpp exactly
(verified against the installed whisper.el sources).
Drop the openai-mode-only settings (api key/model/baseurl); they are
inert in remote mode. The comment records the Lemonade-style
alternative and why live-dictate still needs such a backend.
Verified statically only (parens + endpoint/parsing traced in
whisper.el); runtime test pending with the human.
Mirror the config-linux.el block so both machines have the same
capabilities. packages.el already declares whisper and websocket, and
lisp/live-dictate.el already picks avfoundation for FFmpeg input on
darwin; this adds the use-package! whisper block, the SPC A leader
keys, the live-dictate autoload, and the mac-specific audio input
device (":0" = no video, default microphone, TCC permission prompt on
first use).
Still needs a backend on this machine: an OpenAI-compatible
transcription server on localhost:13305 (Lemonade as on Linux, or
whisper.cpp's server, or a remote host). Until then the commands bind
but fail to connect.
Verified statically on the mac only (parens); runtime needs doom sync.
The old hard-coded ~/.elixir-ls path no longer exists on this machine,
so eglot had no usable Elixir server (and .heex files had none at all).
Mirror the Linux logic from config-linux.el: prefer `expert` (installed
at /opt/homebrew/bin/expert), else any language_server.sh on PATH, else
leave eglot at its default. Covers elixir-mode, elixir-ts-mode and
heex-ts-mode, closing the heex gap left when b425df9 moved server
ownership to the OS files.
Verified on the mac only.
Pure additions (18 lines, no deletions) on top of upstream's config-mac.el:
- header note that the file is seeded from 0789326 and is now owned here,
so re-syncing it with `git checkout mac/master -- config-mac.el' is no
longer safe
- the eglot entry for elixir-ts-mode that was hard-coded in the Linux repo's
shared config.el as /Users/willem/.elixir-ls/... It belongs on the mac
side; the Linux counterpart is in config-linux.el
- blog export roots, with ~/MyDocuments/... as on macOS
This file only loads on darwin, so nothing changes for the Linux machine.