Skip to content

zgx dictation: Parakeet Ultra and Cohere Transcribe, keep every word - #1422

Merged
wingleeio merged 30 commits into
zeronsh:mainfrom
gaelcado:gael/zgx-day-dictation
Nov 26, 2026
Merged

wingleeio merged 30 commits into
zeronsh:mainfrom
gaelcado:gael/zgx-day-dictation

Conversation

@gaelcado

@gaelcado gaelcado commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What changes

  • Two better speech models. Settings → Voice now offers Parakeet Ultra (740 MB, 25 languages), which replaces Parakeet v3, and Cohere Transcribe (1.8 GB, 14 languages). Nothing downloads until you choose; you can switch or remove either one.
  • Dictation no longer loses your words. "Listening" now shows only once the microphone actually hears you, and your chosen microphone opens faster, so speaking as soon as it says so keeps your first word. Letting go of ⌘ before D no longer types a "d" and throws the transcript away. Typing while it transcribes puts the words at your cursor instead of dropping them, and a slow transcription keeps going ("Still transcribing") until its words land; Cancel stops it at once.
  • First use and quitting are clean on macOS. The microphone prompt no longer shows up as an error, and quitting with a model loaded no longer crashes.
  • You choose how long the model stays in memory, from "Instant" to "Always" (5 minutes by default). Once released, it reloads while you speak, so you don't wait.

Before / After

Settings → Voice, dark and light.

Before After

Why

Dictation should be accurate in more than English and never drop what you said. Carries the intent of #591, the original desktop dictation.

For review

  • New speech engine: transcribe.cpp replaces ONNX Runtime. It uses the GPU on macOS (Metal) and the CPU on Linux and Windows for now (a GPU there would make the app need Vulkan just to start). The app is 25 MB smaller; build machines need CMake.
  • x86-64 needs AVX2: a repo-wide .cargo/config.toml builds for it. An older CPU gets a clear message in Settings instead of a crash.
  • Cohere's language: it can't detect the language itself, so a small language-ID model (27 MB) downloads with it.
  • Logos: each model shows its makers' marks (NVIDIA + Moondream, Cohere), the way Providers does. NVIDIA's guidelines generally ask for permission to use its logo.
  • Old model folder: Parakeet v3's folder (670 MB) is deleted at launch. The old app now uses Ultra's folder too, and keeps it in memory for 5 minutes after a dictation (it was 30 s).
  • Targets main (zeron/zgx is frozen): main is merged in (03db149). The only conflicts were the logo list (provider logos and speech-model logos, both kept) and the Zeron v2 hash (main's, still in step). Dictation: list microphones by friendly name on Windows #1334 (Windows microphone names) arrives with it; the shipped notice is renamed speech-models.txt.
  • CI: the voice crate's tests now run in core-tests (it gains CMake and ALSA). One engine timing test (a_streaming_chat_is_saved_whole_only_when_quiet_or_at_the_hard_cap) can flake on Windows; it isn't touched here. Already failing on main, not from this PR: plugins::preview::tests::every_action_the_code_refuses_is_blocked (agents.cloud_key, from 739ab41, isn't in BLOCKED).

Tests

check.sh push clean. New tests cover each fix above. Both models transcribe English and French correctly on the Mac, Linux and Windows.

gaelcado added a commit to gaelcado/comet that referenced this pull request Nov 13, 2026
gaelcado added a commit to gaelcado/comet that referenced this pull request Nov 13, 2026
gaelcado added a commit to gaelcado/comet that referenced this pull request Nov 14, 2026
@gaelcado gaelcado changed the title zgx dictation: Parakeet Ultra on transcribe.cpp, and the first word survives zgx dictation: Parakeet Ultra and Cohere Transcribe, and it keeps every word Nov 14, 2026
@gaelcado gaelcado changed the title zgx dictation: Parakeet Ultra and Cohere Transcribe, and it keeps every word zgx dictation: Parakeet Ultra and Cohere Transcribe, keep every word Nov 14, 2026
@gaelcado
gaelcado force-pushed the gael/zgx-day-dictation branch from 0d77c2a to 0955a30 Compare November 14, 2026 15:38
@gaelcado
gaelcado marked this pull request as ready for review November 14, 2026 19:24
@gaelcado
gaelcado changed the base branch from zeron/zgx to main November 15, 2026 10:02
gaelcado and others added 2 commits November 26, 2026 09:43
… microphone hears

Parakeet v3 (ONNX, 670 MB) gives way to Parakeet Ultra, handy-computer's
Q8_0 GGUF (740 MB), on transcribe.cpp: Metal on macOS, the CPU elsewhere.
The model list (models.json) pins each file's revision, size and SHA-256;
files are hashed once, as they download, not at every load. v3's folder is
removed at launch; whoever had it is offered Ultra on their next dictation.

A microphone delivers its first sound ~150 ms after it opens, and words said
before that are lost: Listening now waits for it (600 ms at most, for a silent
room), and the chosen microphone reopens with the device and configuration it
had last time.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
@gaelcado
gaelcado force-pushed the gael/zgx-day-dictation branch from 03db149 to 51b575e Compare November 26, 2026 09:52
gaelcado and others added 17 commits November 26, 2026 10:55
… keeps the words

Settings → Voice lists the models, a row each: size (GB above 1000 MB),
languages, "In use" on the one dictation uses, Download / Use / Remove, and
on Linux and Windows (the CPU) that Cohere is slower here. Downloading a
model puts it in use; removing the one in use leaves dictation off.

Cohere can't tell the language: a 27 MB language-ID model comes with it and
picks, on the whole recording, among the system's languages Cohere speaks
(the first of them when it can't tell).

Typing during a dictation no longer throws the words away: they land at the
caret as the draft stands, one undo step. Another chat's draft, or the draft
sent or cleared, still does.
…nces

LibriSpeech's own style is bare lowercase, and Cohere answers its clip in
kind; FLEURS English comes back as a sentence from both models. The test
also times a reload after the first load (Metal compiles once a process).
Instant, 15 seconds, 5 minutes (the default), 15 minutes, 1 hour or Always
(while Zeron is open), and what the model in use holds meanwhile (Parakeet
Ultra 1.1 GB, Cohere 2.8 GB). Reloading costs well under a second from the
disk's cache (0.04 s on Metal), seconds only from a cold one. Switching
models or removing the one in use still lets it go at once.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
…able

The old app keeps Ultra in Ultra's folder (models/<id>), as zgx does: no
more downloading it into v3's, which zgx clears at launch. An unknown
folder or model id is an error, never the default's (Remove could have
deleted Ultra). TRANSCRIBE_CMAKE_ARGS moves to the repository's own cargo
config, so a build from the root is as portable as apps/zgx's.
zeron_voice::cpu_supported checks AVX2, FMA, F16C and BMI2 at run time (the
models are built for them); without, no model loads, start and download
refuse with why, and Settings → Voice says so in place of a Download.
…words land

The deadline is 30 s plus as long again as the recording, three times for a
model slow here (Cohere on the CPU). Past it the person is told, the session
goes on, and words that still come land in the draft.
Inserting would cancel an IME's composition. The host says whether the
draft's editor is composing (dictation.composing); the words land once it
has ended, at the caret, the composition kept.
Language ID runs over all of Cohere's languages; when it's sure (p ≥ 0.8)
that's the language, whatever the system's. Unsure, the likeliest of the
system's own languages Cohere speaks; else the first; else English. A
French speaker on an English Mac gets French.
…resumes

`verified` lists each file's SHA-256 and name, so a pin changed on any
file verifies again. A download keeps the files already here that match
their pins and fetches only the rest; a cancelled one leaves nothing. The
language-ID model's attribution (SpeechBrain ECAPA on VoxLingua107,
Apache-2.0, handy-computer's conversion) joins NOTICE and THIRD_PARTY.
…er it's here

A download's progress and Cancel are on its model's row; the Dictation
switch says only whether dictation is on (or on its way, when it asked for
the download). Remove shows whenever any of a model is on disk; Download
resumes. Removing the model in use hands over to another downloaded one
instead of turning dictation off.
…ach time

Only the device is remembered between recordings; the system's audio
settings may have changed its format. The crate's own default keeps a
model 5 minutes, as Settings does.
It says what typing on, finalizing and the unload setting now do.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
…sking isn't a failure

A tap or a cancel while the model loaded left the worker busy for a moment,
and the next press said "Dictation is busy". It now starts as soon as the
worker is done, the bar in its starting look meanwhile (let go first: no
recording, no error). When macOS asks for the microphone (first use, or a
dev build's new signature), the toast says to allow it and hold again, not
that dictation stopped. A slow first load (2 s) still gives the words, no
error on the way.
…een 15 seconds and 5

"Keep the model ready" no longer promises a wait: a released model loads
again while you speak (0.04–0.12 s on Metal, 0.4–1.1 s on the CPU). The
choices: Instant, 15 seconds, 1 minute, 5 minutes (default), 15 minutes,
1 hour, Always.
Parakeet Ultra with NVIDIA's (the base model) and Moondream's (its
post-training), Cohere Transcribe with Cohere's: round, at Providers' size,
overlapping as faces in a stack do (ds/people's cut). The marks join
ds.Mark; Moondream's, published only as a picture, is traced to vector from
its official PNG. Each model names its marks in models.json.
…ompt

Not determined, the access is asked with a completion (the answer crossing
to the window's thread through a channel its poll reads), and the press
waits in the starting look, no toast. Granted while still held, or toggled,
it records; let go before the answer, nothing; denied, the one error saying
where to allow it. Before, the press failed with a toast while macOS asked,
and the held shortcut's key repeat started it again once allowed.
On macOS, Metal's device is a C++ static: destroyed at exit with a model
still holding its buffers, it aborts the app ("quit unexpectedly" on ⌘Q).
release_models() ends a recording under way, stops a decode (one
transcribe.cpp cancel token, set on every session and fired only here),
has the worker let the model go and waits for it (2 s at most). It runs at
exit by itself, registered after the first load so before those statics'
destructors (exit runs handlers newest first), and zgx calls it too once
its windows are gone.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
gaelcado and others added 10 commits November 26, 2026 10:55
It names Parakeet Ultra, Cohere Transcribe and the language-ID model now,
not Parakeet v3.
Each session's cancel is now transcribe.cpp's cancel token, set on the model's
session and language ID's for its decode: the bar's ×, Escape or another chat
stop a long decode where it is, and the worker is free for the next press at
once. Before, only Zeron's exit could stop one (a single token, fired there),
and a cancelled decode held the worker until it finished. Exit now cancels the
running session's token, and a session still queued ends before it starts.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
test-core.sh runs zeron-voice's lib tests (fake microphones and models); the
core job installs ALSA and CMake for it. Timing bounds that a loaded runner
could miss are wider, still under what each one tells apart: Listening within
300 ms of the first sound (the silent room's fallback is ~400 ms away), Instant
let go within 300 ms (the setting before it kept 500), Listening before a
two-second load within 1 s.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
Past the finalizing deadline the session went to "failed" (late=true): a
"Dictation stopped" toast, the bar gone, Send no longer waiting, and ⌘D busy
with nothing to cancel. It is "late" now: still under way, the bar in its
finalizing look, Send waits for the words, Escape stops it, and the toast
says "Still transcribing". Send pressed meanwhile keeps it late; the words
land when they come.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
Choosing another model in Settings → Voice now lets the loaded one go at once
(after a dictation under way): with Always, Cohere's 2.8 GB used to stay until
the next dictation. Removing a model that isn't the one loaded leaves the one
in use loaded. The worker's unload says which model goes; the reference's
"go at once when the model is switched or removed" is now so.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
Cancel said "cancelled" at once, while the download's worker was still
deleting its folder: Settings asked what's on disk too early (Remove stayed),
and a Download right after said another window was downloading. The download
stays under way until its worker has cleaned up; then it's cancelled.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
There the start is refused for the processor first: that answer is accepted.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
As for mermaid-rs: each license's text ships with what it covers (the
dictation runtime and the model makers' marks in Settings → Voice).

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
- Settings search finds Voice by "cohere" too (and zh-Hans lists its terms
  Chinese first, then English, as the file does).
- The old app names its model Parakeet Ultra, not Parakeet v3.
- permission.m: a permission block now retains a callback and its context.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
@gaelcado
gaelcado force-pushed the gael/zgx-day-dictation branch from 51b575e to dffacdf Compare November 26, 2026 09:55
… the caret

tests/dictation.rs played `status` as it answered before Settings → Voice
listed models ({installed, size}), so the page offered a 0 MB download and
its tests failed. It now answers {models, supported} as src/dictation.rs
does, with the models a test has downloaded.

Typing on or moving the caret while dictating now keeps the words, landing
them where the caret is (zeronsh#1422): those two tests say so, and leaving the
editor still drops them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@wingleeio wingleeio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security audit: model downloads are pinned (HF revision + SHA-256 + size, checked against what Hugging Face serves), model folders resolve only from the built-in id list under the data folder, transcribe-cpp 0.4.2 matches its crates.io checksums and fetches nothing at build time, and the new FFI/atexit code is sound. Pushed 4c462f0 to bring tests/dictation.rs in line with the new status shape and words-at-the-caret behaviour. Remaining zgx-linux failures (transcript scroll, reload, mention launcher) fail identically on other PRs; zgx-macos lost its runner.

@wingleeio
wingleeio merged commit 5cd7c8d into zeronsh:main Nov 26, 2026
20 of 23 checks passed
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.

2 participants