Skip to content

feat: add wlk dictate push-to-talk command - #462

Closed
SmittieC wants to merge 7 commits into
QuentinFuxa:mainfrom
SmittieC:feat/dictate
Closed

SmittieC wants to merge 7 commits into
QuentinFuxa:mainfrom
SmittieC:feat/dictate

Conversation

@SmittieC

@SmittieC SmittieC commented Oct 16, 2026 •

Copy link
Copy Markdown

Summary

Adds wlk dictate, a push-to-talk dictation command for Linux/X11. Press F9, speak, press F9 again, and the final text is pasted at the cursor. F8 pastes the last text again. Microphone audio goes straight into AudioProcessor in the same process, so no server or port is opened, and the text is ready about half a second after you stop speaking.

Also adds --compute-type, which passes a CTranslate2 compute type to every faster-whisper model (the LocalAgreement backend and the SimulStreaming encoder). The default stays auto, so current behavior is unchanged (see #112 for why auto is the default). The option exists because large-v3 only keeps up on a laptop RTX 5060 with int8_float16.

Worth a closer look:

  • dictate/app.py: the hotkey listener runs on a pynput thread and hands off to the asyncio loop. Each recording is one AudioProcessor session, and cleanup() is called when it ends.
  • Text is not pasted when a recording has no speech or contains only Whisper's silence filler ("Thank you for watching.").
  • In terminals, paste uses Ctrl+Shift+V instead of Ctrl+V. The clipboard is restored after pasting.

User impact

  • New optional extra dictate (pynput, sounddevice, pyperclip). The command also needs xdotool, x11-utils and libnotify-bin from the system. Linux/X11 only; Wayland and macOS are not supported.
  • New --compute-type flag, default auto. No change for existing users.
  • No changes to the public API or the WebSocket protocol.

Validation

Hardware: NVIDIA GeForce RTX 5060 Laptop GPU, Linux, Python via uv.

  • uv run ruff check .: passed
  • uv lock --check: passed (lockfile updated for the new extra)
  • uv run pytest -q tests/ --ignore=tests/test_pipeline.py --ignore=tests/test_asr_coalescing_pipeline.py: 352 passed, 16 skipped. The new tests (test_dictate_*.py, test_compute_type.py) all ran: 39 passed, none skipped.
  • uv run pytest -q tests/test_asr_coalescing_pipeline.py (Whisper tiny, real audio): 4 passed
  • uv run pytest -q tests/test_pipeline.py -k whisper (Whisper tiny, real audio): 13 passed
  • Smoke test: FasterWhisperASR(model_size="tiny", compute_type="float16") loads on cuda with compute type float16.
  • Manual end-to-end check (microphone, hotkeys, paste) was done outside the automated suite with: wlk dictate --model large-v3 --backend faster-whisper --backend-policy localagreement --lan en --min-chunk-size 1.0 --buffer_trimming_sec 8 --no-vac --compute-type int8_float16.

Checklist

  • I searched for an existing issue or discussion and linked it when relevant.
  • I added or updated tests for behavior changes.
  • I updated documentation for user-facing changes.
  • I ran ruff check ..
  • I ran the relevant pytest suite.
  • I did not commit credentials, model weights, generated caches, or private data.

SmittieC and others added 7 commits October 15, 2026 09:56
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Push-to-talk dictation in one process: F9 streams the microphone into AudioProcessor and pastes the final text at the cursor; F8 pastes it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SmittieC SmittieC closed this Oct 16, 2026
@SmittieC

Copy link
Copy Markdown
Author

Closing this. This was meant to be a PR to my fork of the repo, not this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant