Commit Graph
2 Commits
Author SHA1 Message Date
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 841fbabaea adopt(linux): add live-dictate and firehose-blog from linux-adopt
Two files that exist only on the Linux side, taken verbatim:

  lisp/live-dictate.el   streaming dictation over the Lemonade
                         OpenAI-compatible API (linux repo 978aa86)
  qwan/firehose-blog.el  drag-and-drop images into a firehose blog post,
                         with year dirs, collision suffixes and 16 ERT tests

Both are inert until something requires them.  Wiring lives in
config-linux.el (next commit), not in the shared config.el: live-dictate
depends on whisper.el plus a Lemonade server on :13305, and on macOS
neither exists yet.  Getting live dictation working there is a feature,
not a port: ffmpeg capture, an installed whisper.el, and a reachable
backend.

firehose-blog.el is OS-independent by design and should later replace
qwan/qwan-markdown-dnd.el on both sides -- see the note in config.el.
2026-11-03 12:32:31 +00:00