Sherpa engine is unreachable for desktop-app and release-binary users (CLI source-build only)
Summary
0.19.0 shipped the sherpa engine (in-process parakeet-tdt-0.6b-v3) as a CLI build-from-source opt-in. As shipped, it is NOT reachable by:
- anyone using a released binary (DMG, Homebrew, cargo, GitHub CLI assets), or
- the Tauri desktop app at all (no feature path, even from source).
So the "Recommended SOTA engine" in the README is currently only usable by people who build the CLI from source with --features engine-sherpa.
Evidence (verified)
-
No release workflow includes
engine-sherpa:- release-cli.yml:
parakeet,metal(macOS),parakeet(linux/windows) - release-macos.yml:
parakeet,metal(CLI + tauri) - release-windows-desktop.yml:
parakeet - Homebrew formula builds from source with default features (no sherpa)
Result:
engine = "sherpa"on a released binary silently falls back to Whisper.
- release-cli.yml:
-
The tauri crate (
tauri/src-tauri/Cargo.toml) has noengine-sherpapassthrough. Its features areparakeet/coreml/cuda/hipblas/metal/vulkan, and it depends on minutes-core withfeatures = ["streaming", "diarize"]. There is currently no way to build the desktop app with sherpa. -
Docs (README section + docs/SHERPA-ENGINE.md) describe only the CLI source-build path. README calls sherpa the "Recommended SOTA engine" without flagging that app + release-binary users cannot reach it today.
Proposed fix
- Add
engine-sherpa = ["minutes-core/engine-sherpa"]to the tauri crate features. (Verified locally: the app builds and runs with this added.) - Add
engine-sherpato the release builds (release-cli, release-macos, release-windows-desktop) so installed binaries contain the engine. Confirm the sherpa-rs native lib is correctly linked/bundled and codesigned in the .app and .exe on each OS. The ~670MB model stays a separateminutes setup --sherpadownload, and the existing graceful Whisper fallback covers the no-model case, so shipping the engine on-by-default in binaries is low risk. - Validate that Linux and Windows bundles actually run sherpa end to end before flipping it on (the opt-in-first / protect-Win-Linux caution).
- README/docs: state current availability accurately, and simplify the build-from-source framing once binaries include the engine.
Context
Phased rollout was intentional (CLI-first opt-in in 0.19.0), but the desktop-app + release-binary gap means most users cannot try the engine we call recommended. Target a 0.19.1 / 0.20.0 follow-up.
Real-world hit of this today (#395): a maintainer config with engine = "sherpa" (set up to test the SOTA stack in the dev app) silently degraded a live meeting to whisper because no app build can compile sherpa; the tauri crate did not even expose the feature. The #395 PR adds engine-sherpa/vad-ort features to the tauri crate and defaults LOCAL builds (build.sh, install-dev-app.sh) to include them, so dev/maintainer builds can honor the config. Release binaries are unchanged, so the decision this issue asks for (ship sherpa in release desktop builds or not) is still open.
Concrete blocker found while dogfooding #396: building the app or CLI with engine-sherpa/vad-ort produces binaries that link @rpath/libsherpa-onnx-c-api.dylib and @rpath/libonnxruntime.1.17.1.dylib, but nothing bundles those dylibs into the .app (no Contents/Frameworks) or sets an rpath on an installed CLI. Result: dyld "Library not loaded ... no LC_RPATH's found" at launch. Reproduced live on the maintainer machine; #397 reverts the default. Shipping sherpa to app users needs dylib bundling (Frameworks + install_name_tool, or tauri resources) or static linking, on top of the feature plumbing #396 added.
The packaging blocker is fixed on main (#398): macOS opt-in engine-sherpa builds now link sherpa-onnx statically and are fully self-contained (verified by real app launch and a real sherpa transcription; zero dangling dylib refs). Linux/Windows stay dynamic (upstream's static path needs a global RUSTFLAGS hack) and must run from the cargo target layout, now documented in docs/SHERPA-ENGINE.md. Remaining for this issue: the release decision (ship sherpa in release desktop/CLI binaries: size, notarization, NOTICE attribution for the embedded runtime), Linux/Windows install packaging, and sherpa-live (does not exist; live remains whisper/parakeet).
Real-world A/B data for the release decision, now that #398 makes sherpa builds usable: same 75-minute real meeting audio (voice stem, clean mic capture), same machine (M-series), CLI from main with both engines.
| parakeet.cpp (tdt-600m) | sherpa-onnx (parakeet-tdt-0.6b-v3 int8) | |
|---|---|---|
| Wall clock | 271s (~16.8x RT) | 300s (~15.2x RT) |
| Words emitted | 12,723 | 11,971 (~6% fewer) |
| Segmentation | per-utterance with timestamps | fixed ~15s windows |
| Casing/punctuation | consistent | mostly lowercase run-ons, intermittent casing |
| Names/domain terms | tie (McLean, Silverstein, medication 40x, pharmacist 26x identical) | tie |
| Detail drops | none observed in samples | "The future's coming for you, Dan" -> "the future's dan"; "Matt, you're muted" -> "Match you muted" |
Takeaway: the v3 model does not currently beat the parakeet.cpp path in practice because the integration is still the #346 scaffold. Before sherpa can be the recommended default (here or in release binaries), it needs: (1) endpoint/VAD-based segmentation instead of fixed windows, (2) a casing/punctuation pass, (3) an fp16-vs-int8 check for the dropped-word cases. Until then parakeet remains the better daily engine, and the docs' "recommended SOTA" framing for sherpa overstates the current state.
VAD-segmentation result: sherpa is now competitive with parakeet
The fixed-window (~15s) segmentation was the main reason sherpa lost the earlier A/B — it cut mid-utterance, hallucinated over silence, and dropped words at seams. Replaced it with Silero-VAD speech-region segmentation (pad 200ms, merge <300ms gaps, split >30s), reusing the same VAD the batch path already uses, with a graceful fallback to fixed-window.
Real-content A/B (same 75-min tora-health voice stem as before):
| Signal | fixed-window sherpa (prior) | VAD-sherpa | parakeet |
|---|---|---|---|
| Words | 11,971 | 12,057 | 12,723 |
| Casing (capitalized) | (poor) | 791 | 792 |
| Sentence punctuation | (poor) | 649 | 633 |
| medication / pharmacist / Medicare | — | 40 / 26 / 4 | 40 / 26 / 4 |
| Proper names (McLean/Silverstein/Deb/Dan) | — | 0 / 0 / 5 / 22 | 1 / 1 / 7 / 27 |
Casing/punctuation is now tied with parakeet (the earlier "lowercase run-on" verdict was an artifact of a sparse test-phrase sample). The seam-dropped-word bug is fixed: fixed-window mangled "the future's coming for you, Dan" -> "the future's dan"; VAD-sherpa renders it correctly. Domain vocabulary is identical to parakeet.
Remaining gap: parakeet still edges sherpa on proper names (sherpa misses McLean/Silverstein) and ~5% completeness + finer per-utterance timestamps. Real but small.
Decision: merging the VAD-segmentation (it takes sherpa from "loses badly" to "competitive by a hair", with a fallback + test). Keeping parakeet as the recommended default — it still leads on names/completeness. Sherpa is now a legitimate opt-in alternative (multilingual v3 edge) rather than a broken experiment. Not investing further in closing the last of the name/completeness gap now — diminishing returns; revisit if the model updates or the multilingual path becomes a priority. Name fidelity would likely come from wiring the vocabulary-store decode hints into the sherpa path (future).
Status update: the blocker changed shape, and the A/B above now measures an unreachable baseline
#725 landed the plugin isolation from #685. Recording what is true on main today so the release decision gets made against current facts rather than July's.
Why releases still omit sherpa
Not a leftover from the #397 revert. The static linking in #398 fixed the dangling dylib refs, then exposed a second problem: sherpa-onnx bundles ONNX Runtime 1.17.1, and speaker diarization uses ORT 1.22.0 through ort-sys. Statically linking both into one macOS binary puts two copies of the ORT symbols in a flat namespace, so engine-sherpa and diarize could not coexist at all. Shipping sherpa would have meant dropping diarization.
#725 fixes that by moving sherpa into crates/sherpa-plugin, a cdylib outside the workspace exporting a five-function C ABI, loaded with dlopen at runtime. The plugin keeps ORT 1.17 private to itself; the host keeps ORT 1.22 for diarization. Verified on arm64 hardware: one binary doing voice enrollment through ORT 1.22 and sherpa transcription through the plugin's ORT 1.17, in the same process, then both together.
The A/B in this thread is measuring something users cannot get
The July comparison was sherpa against parakeet.cpp, concluding sherpa does not clearly win. That no longer describes the choice. parakeet_private_audio_transport_supported() returns a hardcoded false (crates/core/src/pipeline.rs:1330), so effective_batch_engine resolves a parakeet request to whisper. Parakeet is unreachable on a release binary too.
The live question is therefore sherpa against whisper, not sherpa against parakeet, and sherpa is the only SOTA batch engine a released build could offer today. That argues for shipping it. It does not by itself answer the signing and size questions below.
The product decision still open
A. Separate download (my recommendation). setup --sherpa fetches the plugin next to the 670 MB model it already pulls. Sherpa is opt-in, so the extra megabytes are invisible on that path and the default desktop download stays its current size. Costs a second signed artifact and a checksum path.
B. Bundled in the app. Simplest signing story, since the dylib joins the existing inside-out signing sequence. Every user carries the weight whether or not they ever enable sherpa.
What either shape needs
- Signing and notarization. An unsigned or ad-hoc-signed dylib loaded by a notarized hardened-runtime app is refused by Gatekeeper. Shape A needs the plugin signed and notarized standalone; shape B folds it into the app's sequence. This needs the maintainer's Developer ID, and a CI-green run that skips notarization would prove nothing.
release-macos.ymlis hash-gated as packaging authority bycheck_graph_worker_packaging.mjs, so the change is a deliberate review and the golden hash moves with it.- The CLI tarball has the same shape as the Windows runtime DLLs in #657: the dylib must sit beside the executable or the binary silently lacks the engine. The import-table guard from #668 is the model for asserting it.
- Restore
engine-sherpainrelease-cli.ymlandrelease-macos.ymlonce the plugin ships, then re-run the #685 verification against the packaged artifacts rather than a source build.
Correctness note
setup --sherpa installs only the model today, and the plugin loader deliberately does not name that command in its error text, because pointing at it would send someone round a loop that cannot fix their problem. When packaging lands, that message plus the references in docs/architecture/sherpa-engine.md and the README should start naming it again.
Scope
#645 covers Linux and Windows, where sherpa-rs still links dynamically. The above is the macOS path only. I opened #728 for this before spotting it duplicated this issue, so I have closed it and consolidated here.
Measured the blocker rather than citing it, now that the release is out and the Mac is free. Three findings, one of which reverses my earlier recommendation.
The requirement, confirmed on hardware
The plugin builds clean on arm64 against current main: libminutes_sherpa.dylib, 22.6 MB, 13s. Its signature as Rust produces it:
CodeDirectory ... flags=0x20002(adhoc,linker-signed)
Signature=adhoc
TeamIdentifier=not set
spctl --assess --type install -> rejected
So the artifact is ad-hoc signed and Gatekeeper rejects it, which is what I have been asserting from documentation and had not shown. Note the distinction that #770 just ran into from the other direction: codesign --verify --strict passes on this file. A valid signature is not acceptable provenance, and only the policy assessment tells you which one you have.
Where the signing authority actually is
Not on the Mac. The only identity reachable there is Apple Development: Mathieu Silverstein, which cannot produce a distributable notarized artifact, and the login keychain is locked to non-interactive sessions.
The Developer ID lives as repository secrets (APPLE_CERTIFICATE, APPLE_CERTIFICATE_PASSWORD, APPLE_SIGNING_IDENTITY) that release-macos.yml imports into an ephemeral keychain. That is the canonical path, so this work belongs in that workflow rather than in a local build, and it is testable the same way #770 was: assess a downloaded artifact.
I am reversing the recommendation
Earlier I argued for shipping the plugin as a separate download to keep 22 MB off the default desktop download. I now think that is the wrong call, and #770 is the reason.
That bug was a DMG that was notarized and stapled and still failed Gatekeeper, because the disk image had never received a primary signature. A second, standalone notarization flow for the plugin is exactly the shape that produces that class of bug, and it would be a new one to get right.
Bundling the plugin inside the app instead reuses machinery that already exists and is already hash-sealed: release-macos.yml signs the graph-worker XPC service inside-out before the outer app signature, and notarization covers the whole bundle. Adding one more payload to a proven sequence is a much smaller risk than inventing a parallel one.
The cost is honest and worth stating: every desktop download carries ~22 MB whether or not the user enables sherpa.
The CLI tarball is a separate question with no .app to hide in, and I would treat it separately rather than let it force the desktop decision.
What I have not done
I have not touched release-macos.yml. It is hash-sealed as packaging authority and Codex repaired it hours ago in #770; starting an edit there at the end of a long session, on the file that just had a signing bug, is not a good trade. The next step is a scoped change to that workflow plus its reseal, with verification being a Gatekeeper assessment of the plugin extracted from a downloaded build.
Adding a data point from the same family, found while debugging #789 — engine = "parakeet" has the same "configured but unreachable" shape as sherpa here, with one extra twist worth recording.
Parakeet is dormant in core regardless of build flags. crates/core/Cargo.toml:
# Retained Parakeet preferences currently resolve to Whisper on every platform.
# Keep that fallback executable even in `--no-default-features --features parakeet` builds.
parakeet = ["whisper"] # dormant subprocess contract; runtime selection stays gated
# until secure byte transport exists
So unlike sherpa — where the fix is adding the feature to the tauri crate and the release workflows — building with --features parakeet still doesn't get you parakeet. The runtime gate refuses it (pipeline.rs: "unavailable because the Parakeet process cannot receive secure private audio on this platform"). That's intended behaviour, but it means the config accepts a value that cannot be honoured on any current build.
Real-world consequence: this config has read engine = "parakeet" for weeks, ~/.local/bin/parakeet exists and runs, tdt-600m is downloaded, parakeet_resolve logs a successful path resolution on every run — and every transcript has silently been Whisper.
The binaries also disagree about how to fail, on identical config:
| Binary | minutes transcribe with engine = "parakeet" |
|---|---|
Minutes.app/Contents/MacOS/minutes |
warns, falls back to Whisper, succeeds |
~/.local/bin/minutes v0.24.0 |
hard error: engine 'parakeet' not compiled in |
/opt/homebrew/bin/minutes v0.24.0 |
same hard error |
crates/cli/Cargo.toml has default = ["whisper", "diarize"], so a CLI built without the feature errors where the app degrades. Same version number, same config file, different outcome.
Suggestion, in the spirit of this issue: pick one failure mode and make config validation say so at load. Either reject engine = "parakeet" with "dormant in this build, using whisper", or fall back with a warning in the CLI the way the app does. Right now the honest answer is that the setting is aspirational, and nothing tells the user that.
(The processing_warnings entry from #633 does surface the substitution in the meeting frontmatter, which is how it eventually got noticed — that mechanism is working.)