Commit Graph
10 Commits
Author SHA1 Message Date
Willem van den Ende bd8622756e configure mtplx instead of mlx-lm
use api key from config-local
2026-11-14 13:56:16 +00:00
Willem van den Ende ffa95852c0 fix(live-dictate): pick the real microphone and add a diagnose command
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.
2026-11-05 12:26:14 +00:00
Willem van den Ende 580b213793 fix(live-dictate): talk to whisper.cpp's HTTP API instead of Lemonade realtime
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.
2026-11-05 12:14:30 +00:00
Willem van den Ende 183036a333 fix(mac): aim whisper.el at the whisper.cpp server (remote mode)
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.
2026-11-05 12:01:20 +00:00
Willem van den Ende 044e8145d5 feat(mac): port whisper/live-dictate speech-to-text from Linux
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.
2026-11-05 10:11:59 +00:00
Willem van den Ende 243bc8ba2a fix(mac): configure the elixir server that actually exists
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.
2026-11-05 10:08:59 +00:00
Willem van den Ende b703ccb4b0 adopt: config-mac.el -- ownership note, elixir server, blog roots
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.
2026-11-03 12:32:53 +00:00
Willem van den Ende b78dd4f959 update models 2026-06-28 22:28:46 +02:00
Willem van den Ende 9c84faa6aa journelly: roam refs before title 2026-02-08 21:04:04 +00:00
Willem van den EndeandClaude Opus 4.5 bc7aa5ada6 add config-mac.el with gptel configuration
- Global gptel-include-reasoning redirects thinking to *llm-thinking* buffer
- Backends: llama.cpp, Ollama, GLM-think (DeepSeek parser)
- Presets: explain, elixir, glm-fast, glm-think, glm-search
- search_notes tool for org-roam integration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 13:28:03 +00:00