From 183036a333f60b03a3f32245dfc30a9d9ccfb59a Mon Sep 17 00:00:00 2001 From: Willem van den Ende Date: Thu, 5 Nov 2026 12:01:20 +0000 Subject: [PATCH] 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 /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. --- config-mac.el | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/config-mac.el b/config-mac.el index c28ce73..c1ac551 100644 --- a/config-mac.el +++ b/config-mac.el @@ -238,12 +238,19 @@ Returns answer with org-roam links to sources." ;; Ported from config-linux.el so both machines have the same capabilities. ;; The pieces are already cross-platform: `whisper' and `websocket' are ;; declared in shared packages.el, and lisp/live-dictate.el picks avfoundation -;; for FFmpeg input on darwin by itself. What this machine still needs is a -;; backend: an OpenAI-compatible transcription server listening on -;; localhost:13305 (as on Linux) -- see the checklist in agent-start-here.md -;; or the comment in config-linux.el. Until one runs, these commands bind -;; but fail to connect; point `whisper-openai-api-baseurl' and -;; `live-dictate-server-url' elsewhere to use a remote backend. +;; for FFmpeg input on darwin by itself. +;; +;; Backend on this machine: homebrew's whisper.cpp server, started by hand: +;; +;; whisper-server -m ~/.cache/whisper/ggml-large-v3-turbo.bin \ +;; --host 127.0.0.1 --port 13305 +;; +;; Mode `remote' POSTs multipart (file, response_format=json, language) to +;; /inference and parses the {"text": ...} reply -- whisper.cpp's +;; native API. For a Lemonade-style OpenAI-compatible backend instead, use +;; `whisper-server-mode' 'openai with `whisper-openai-api-baseurl'; that is +;; also what `live-dictate' (SPC A d) requires, since it streams over +;; ws://host/v1/realtime, which whisper.cpp cannot serve. (add-load-path! "lisp") (autoload #'live-dictate "live-dictate" nil t) @@ -257,13 +264,11 @@ Returns answer with org-roam links to sources." :desc "Whisper select language" "l" #'whisper-select-language :desc "Live dictate (streaming)" "d" #'live-dictate)) :config - (setopt whisper-install-whispercpp nil ; no whisper.cpp needed, remote API only - whisper-server-mode 'openai ; use OpenAI-compatible transcription API - whisper-openai-api-baseurl "http://localhost:13305/" - whisper-openai-api-key "not-needed" ; Lemonade ignores auth, but whisper.el requires a non-nil key - whisper-openai-model "Whisper-Large-v3-Turbo" + (setopt whisper-install-whispercpp nil ; use homebrew's whisper.cpp, not a private copy + whisper-server-mode 'remote ; talk to a running whisper.cpp server + whisper-server-baseurl "http://localhost:13305" whisper-language "en" - whisper-translate nil ; t would POST to /translations instead + whisper-translate nil ; whisper.cpp translates only via server --translate flag whisper-return-cursor 'end)) ;; live-dictate's avfoundation input needs an explicit `-i' of the form