Repository navigation
Conversation
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>
Author
|
Closing this. This was meant to be a PR to my fork of the repo, not this one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 intoAudioProcessorin 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 staysauto, so current behavior is unchanged (see #112 for whyautois the default). The option exists becauselarge-v3only keeps up on a laptop RTX 5060 withint8_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 oneAudioProcessorsession, andcleanup()is called when it ends.User impact
dictate(pynput,sounddevice,pyperclip). The command also needsxdotool,x11-utilsandlibnotify-binfrom the system. Linux/X11 only; Wayland and macOS are not supported.--compute-typeflag, defaultauto. No change for existing users.Validation
Hardware: NVIDIA GeForce RTX 5060 Laptop GPU, Linux, Python via
uv.uv run ruff check .: passeduv 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 passeduv run pytest -q tests/test_pipeline.py -k whisper(Whisper tiny, real audio): 13 passedFasterWhisperASR(model_size="tiny", compute_type="float16")loads oncudawith compute typefloat16.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
ruff check ..