Repository navigation
Live text: show what a dictation has said so far beside the HUD (live-text experiment) - #324
Conversation
…-text experiment) With the `live-text` experiment on, a hotkey dictation on a streaming model (Parakeet Unified English on a GPU) shows its text as you speak: one click-through line just past the recording HUD, growing with the words and then keeping the newest in view behind "…". It is provisional and only ever shown; the paste is unchanged. - Engine: a dictation stream gets its own partial slot and publishes the model's stable and tentative text after each feed; a failed or interrupted stream clears it. `/streams` shares the same slot type. - Capture: `DictationCapture::report_live_text`, called by the macOS, Linux, and Windows capture loops, shows the recording's text through its `live_text::Publisher`. The recording owns it, so every ending (release, Escape, a short tap, a lost microphone) hides the line, and an older recording never clears a newer one's text. - UI: one Rune overlay shared by every OS, prewarmed so macOS never reveals the previous dictation's words, placed where `rune_hud` last showed the HUD: on macOS just past the plate it placed (`hud_placement::beside_plate`) on the pointer's screen, on Linux and Windows past its centred plate on the primary display, and with the HUD hidden in its place at the top. - AGENTS.md: "Nothing pastes or reaches the focused app before the final text" now says live text may show in Hex's own HUD. Measured on Apple Silicon (Metal): text arrives in ~1 s steps, about 1–2 s behind speech, with no change to the final text or release latency. Checked by hand on an M3 Pro (see the feature map); Linux and Windows are built only by CI. The feature map also records a pre-existing defect found while testing: after a pause longer than the model's 5.6 s left context, the stream can drop the first word of the next sentence. NeMo's reference buffered streaming drops it on the same audio, so it is the model's behaviour, not transcribe.cpp's. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2a92b67 to
c567c6d
Compare
|
Merged, thank you @ElliottH! This was a really thorough PR: per-stream partials, recording-owned publishers so stale text can't leak, and the measurements. I merged dev in (it went cleanly after the Rune HUD landed) and allowed the macOS-only — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
…) (#367) A buffered Parakeet stream can drop the first word after a pause longer than its 5.6 s left context (#324). The engine now feeds a dictation stream only the first 2.5 s and last 0.3 s of each pause; the clip and its offline fallback are unchanged. Co-authored-by: ElliottH <[email protected]>
|
Thanks @ElliottH for building Live text, it's still in Hex. To keep Hex simple for new users, unproven features now live in Settings › Labs, off by default. To keep using it, turn on Live text there, or run — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
Summary
Adds a
live-textexperiment: while you hold the shortcut, a hotkey dictation on a streaming model (Parakeet Unified English on a GPU) shows what you've said so far as one click-through line just past the recording HUD. The newest words stay in view, with "…" cutting the start. The line is provisional and only ever shown. The paste, History and Paste Last are unchanged. With the experiment off, nothing changes.transcription_engine.rs): each dictation stream gets its own partial slot and publishes the model's stable and tentative text after every feed. A failed or interrupted stream clears it./streamsnow uses the same slot type.dictation.rs,live_text.rs):DictationCapture::report_live_text, called by the macOS, Linux and Windows capture loops, shows the recording's text through alive_text::Publisher. The recording owns that publisher, so every ending (release, Escape, a short tap, a lost microphone) hides the line, and an older recording never clears a newer one's text.rune_ui/live_text.rs): one Rune overlay shared by every OS, prewarmed so macOS never reveals the previous dictation's words. Each host says where its HUD is:hud_placement::beside_plate), on the pointer's screen.rune_huddraws, on the primary display.AGENTS.mdstreaming invariant now reads "Nothing pastes or reaches the focused app before the final text", and says live text may show in Hex's own HUD. The feature map gainsdictate.live-text, its checks and its observed verification.Measurements
On Apple Silicon (Metal), replaying speech through
metal_stream_tracks_offline_transcriptionwith live text on:Pre-existing defect found while testing (not fixed here)
After a pause longer than the model's 5.6 s left context, the stream can drop the next sentence's first word, for example "successfully. I now" becoming "successfully now". Whether it happens depends on where speech resumes within an 80 ms encoder frame. NeMo's reference buffered streaming drops the word on the same audio, so this is the model's behaviour, not transcribe.cpp's. The details are in the feature map. A fix is being prepared separately.
Test plan
scripts/checkon macOS: fmt, clippy, and all tests (1,794 passed). New tests cover:beside_plategeometry (Below, Bottom, menu bar, notch).Hex Test.appwith a physical microphone:🤖 Generated with Claude Code