From f4d8648cc90d9e14649582aa731b26a586160128 Mon Sep 17 00:00:00 2001 From: Pete Jackson Date: Sun, 22 Nov 2026 13:57:13 -0500 Subject: [PATCH 1/2] Document that the macOS build has only Whisper and Soniox The macOS workflow builds with --features gpu-metal alone, so the DMG and Homebrew binaries carry Whisper (with Metal) and Soniox and nothing else. INSTALL.md, the website and INSTALL_MACOS.md said every engine was there, recommended Parakeet as the first model, and offered a Parakeet source build that is not part of the release or tested on macOS. Say plainly what the macOS build includes, and that the other engines are Linux-only for now. Fixes #632 --- README.md | 2 ++ docs/CONFIGURATION.md | 2 ++ docs/FAQ.md | 2 +- docs/INSTALL.md | 2 +- docs/INSTALL_MACOS.md | 41 ++++++++++++++++++++++++++++---------- docs/MACOS_ARCHITECTURE.md | 6 ++++-- docs/USER_MANUAL.md | 2 ++ website/index.html | 2 +- 8 files changed, 43 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 03837be0..5aced14e 100644 --- a/README.md +++ b/README.md @@ -364,6 +364,8 @@ With GPU acceleration, `large-v3` achieves sub-second inference while supporting Voxtype ships separate binaries for Whisper and ONNX engines. Use `voxtype setup onnx --enable` to switch to the ONNX binary, or `--disable` to switch back. +**macOS:** the macOS build includes only the Whisper and Soniox engines. The other engines are Linux-only for now, and `voxtype setup onnx` does not apply there. See [INSTALL_MACOS.md](docs/INSTALL_MACOS.md#available-engines). + | Engine | Languages | Architecture | Best For | |--------|-----------|-------------|----------| | **Whisper** (default) | 99 languages | Encoder-decoder (whisper.cpp) | General use, multilingual | diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 8ff97802..7823313f 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -154,6 +154,8 @@ Selects which speech-to-text engine to use for transcription. - `omnilingual` - FunASR Omnilingual CTC via ONNX Runtime (50+ languages) - `cohere` - Cohere Transcribe via transcribe.cpp/GGUF or legacy ONNX Runtime (14 languages) +**macOS:** the macOS build includes only the Whisper and Soniox engines. The other engines are Linux-only for now, and `voxtype setup onnx` does not apply there. See [INSTALL_MACOS.md](INSTALL_MACOS.md#available-engines). + **Example:** ```toml engine = "whisper" diff --git a/docs/FAQ.md b/docs/FAQ.md index 5c50bc3f..86262be6 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -211,7 +211,7 @@ Yes! Voxtype supports optional GPU acceleration: - **Vulkan** - Works on AMD, NVIDIA, and Intel GPUs (included in packages) - **CUDA** - NVIDIA GPUs (build from source) -- **Metal** - Apple Silicon (build from source) +- **Metal** - Apple Silicon (included in the macOS release) - **HIP/ROCm** - AMD GPUs (build from source) **Vulkan (easiest):** Packages include a pre-built Vulkan binary. Install the runtime and enable: diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 5f6272de..aa96c009 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -224,7 +224,7 @@ Fedora's ydotool ships as a system service that needs extra setup. See [TROUBLES ### macOS -Universal binary: Apple Silicon and Intel. Uses Microsoft ONNX Runtime so every engine is available, including Parakeet on the Neural Engine path. +Universal binary: Apple Silicon and Intel. The macOS build includes two engines: Whisper, which runs locally with Metal acceleration or against a remote Whisper server, and Soniox, a cloud engine. Parakeet, Moonshine, SenseVoice, Paraformer, Dolphin, Omnilingual, Cohere, the GGUF engine and OpenVINO are Linux-only for now. ```bash brew install --cask peteonrails/voxtype/voxtype diff --git a/docs/INSTALL_MACOS.md b/docs/INSTALL_MACOS.md index 257b957c..9fbef844 100644 --- a/docs/INSTALL_MACOS.md +++ b/docs/INSTALL_MACOS.md @@ -1,6 +1,6 @@ # Voxtype macOS Installation Guide -Voxtype is a push-to-talk voice-to-text tool with fast, local speech recognition using Parakeet or Whisper. +Voxtype is a push-to-talk voice-to-text tool with fast, local speech recognition using Whisper. > **Note:** macOS support is in beta. The binaries are currently unsigned, which requires a few extra steps during installation. Once we have signed and notarized binaries, this process will be simpler. @@ -52,13 +52,22 @@ This is a one-time setup: ### Download a Speech Model ```bash -# Recommended: Parakeet (fast, accurate) -voxtype setup --download --model parakeet-tdt-0.6b-v3-int8 - -# Or use Whisper +# Small and fast voxtype setup --download --model base.en + +# Or larger and more accurate (Metal keeps it quick on Apple Silicon) +voxtype setup --download --model large-v3-turbo ``` +### Available Engines + +The macOS build includes two engines: + +- **Whisper**, which runs locally with Metal acceleration, or against a remote Whisper server (see `[whisper] mode` in [CONFIGURATION.md](CONFIGURATION.md)). +- **Soniox**, a cloud engine (see [SONIOX.md](SONIOX.md)). + +Parakeet, Moonshine, SenseVoice, Paraformer, Dolphin, Omnilingual, Cohere, the GGUF engine and OpenVINO are Linux-only for now. `voxtype setup onnx --enable` switches between Linux binary variants, so it does not apply on macOS. + ## Usage Hold **Right Option** (⌥) to record, release to transcribe. Text is typed into the active application. @@ -95,15 +104,12 @@ keep using it until you move the file to `~/.config/voxtype/`. ```toml # Transcription engine -engine = "parakeet" # or "whisper" +engine = "whisper" # or "soniox" [hotkey] key = "RIGHTALT" # Right Option key mode = "push_to_talk" # or "toggle" -[parakeet] -model = "parakeet-tdt-0.6b-v3-int8" - [whisper] model = "base.en" @@ -139,7 +145,16 @@ This happens because the app is unsigned. Go to System Settings > Privacy & Secu ### Model not found ```bash -voxtype setup --download --model parakeet-tdt-0.6b-v3-int8 +voxtype setup --download --model base.en +``` + +### "engine unavailable" or "not compiled into this binary" + +The config names an engine the macOS build does not include, such as +`parakeet`. Switch back to Whisper: + +```bash +voxtype config set engine whisper ``` ### Daemon not starting @@ -183,9 +198,13 @@ rm -rf ~/Library/Logs/voxtype ```bash git clone https://github.com/peteonrails/voxtype.git cd voxtype -cargo build --release --features parakeet +cargo build --release --features gpu-metal ``` +This matches the release build: Whisper with Metal, plus Soniox. The ONNX and +GGUF engine features are not part of the macOS release or its CI, and are +untested on macOS. + ## Getting Help - GitHub Issues: https://github.com/peteonrails/voxtype/issues diff --git a/docs/MACOS_ARCHITECTURE.md b/docs/MACOS_ARCHITECTURE.md index 149bd8ac..ca3db2f0 100644 --- a/docs/MACOS_ARCHITECTURE.md +++ b/docs/MACOS_ARCHITECTURE.md @@ -145,10 +145,12 @@ Build scripts: ### Building Rust Binary -**All macOS binaries must include Parakeet support:** +The release workflow (`.github/workflows/build-macos.yml`) builds with +`--features gpu-metal` only, so the macOS binary includes Whisper (with Metal) +and Soniox. The ONNX and GGUF engines are Linux-only for now (#632). ```bash -cargo build --release --features parakeet +cargo build --release --features gpu-metal cp target/release/voxtype /Applications/Voxtype.app/Contents/MacOS/ ``` diff --git a/docs/USER_MANUAL.md b/docs/USER_MANUAL.md index 38f35acb..39dc4d41 100644 --- a/docs/USER_MANUAL.md +++ b/docs/USER_MANUAL.md @@ -1446,6 +1446,8 @@ Any valid evdev key name works. Common choices: Voxtype supports seven speech-to-text engines. Whisper uses whisper.cpp and works with any binary variant. The other six engines run via ONNX Runtime and require an ONNX binary variant (`voxtype-*-onnx-*`). +**macOS:** the macOS build includes only the Whisper and Soniox engines. The other engines are Linux-only for now, and `voxtype setup onnx` does not apply there. See [INSTALL_MACOS.md](INSTALL_MACOS.md#available-engines). + | Engine | Best For | GPU Required | Languages | |--------|----------|--------------|-----------| | **Whisper** (default) | Most users, multilingual | Optional (faster with GPU) | 99+ languages | diff --git a/website/index.html b/website/index.html index d2f6a21b..82abf93a 100644 --- a/website/index.html +++ b/website/index.html @@ -1041,7 +1041,7 @@

Installation

-

Universal binary: Apple Silicon and Intel. Uses Microsoft ONNX Runtime so all engines are available, including Parakeet on the Neural Engine path.

+

Universal binary: Apple Silicon and Intel. Includes the Whisper engine with Metal acceleration and the Soniox cloud engine. The other engines are Linux-only for now.

Install via Homebrew From ac00403b2c3cc2895b8360516b9ddbb8a1f7650f Mon Sep 17 00:00:00 2001 From: Pete Jackson Date: Sun, 22 Nov 2026 14:02:53 -0500 Subject: [PATCH 2/2] Tell macOS users which engines their build has When a macOS user picked an engine the release binary lacks, voxtype told them to rebuild with a Cargo feature, run `sudo voxtype setup onnx --enable`, or install a Linux variant. None of those exist on macOS: the release is built with gpu-metal only and has no variants. The install hint, the daemon's startup and failure notices, `voxtype config set` and `voxtype info variants` now say the macOS build includes only Whisper and Soniox and the other engines are Linux-only for now. The macOS branch is chosen by Host::system() and cfg!, so Linux wording is unchanged and the hint logic is unit tested on every platform. Fixes #632 --- src/app/info.rs | 5 +++ src/config_set.rs | 59 +++++++++++++++++++++------ src/failure_notice.rs | 36 +++++++++++++++++ src/setup/install_hint.rs | 81 +++++++++++++++++++++++++++++++++++++- src/setup/variant_check.rs | 47 ++++++++++++++++++++++ 5 files changed, 215 insertions(+), 13 deletions(-) diff --git a/src/app/info.rs b/src/app/info.rs index db24ccda..b1965776 100644 --- a/src/app/info.rs +++ b/src/app/info.rs @@ -518,6 +518,11 @@ fn print_variants_text(inv: &setup::binary::Inventory, config: &Config) { println!(" {}", workers); println!(); + if cfg!(target_os = "macos") { + println!("macOS build: variant switching not applicable."); + println!("{}.", setup::install_hint::MACOS_ENGINES); + return; + } if matches!(inv.install_kind, InstallKind::Source) { if setup::install_hint::is_nix_store_path(&inv.binary_path) { let running = setup::install_hint::running_nix_package(); diff --git a/src/config_set.rs b/src/config_set.rs index 803fbb22..1d44fbb2 100644 --- a/src/config_set.rs +++ b/src/config_set.rs @@ -184,7 +184,8 @@ fn set_engine_with_models( return Err(ConfigSetError::UnknownEngine(name.to_string())); } if !engine_feature_compiled(name) { - return Err(ConfigSetError::FeatureNotCompiled(name.to_string())); + return Err(macos_engine_missing(name) + .unwrap_or_else(|| ConfigSetError::FeatureNotCompiled(name.to_string()))); } let mut editor = ConfigEditor::load_from_path(path)?; @@ -417,6 +418,16 @@ fn write_warning( } } +/// On macOS, the refusal for an engine this binary lacks. The macOS release +/// has no variant that has it and no supported rebuild, so it names the +/// engines it has instead (#632). `None` elsewhere. +fn macos_engine_missing(engine: &str) -> Option { + cfg!(target_os = "macos").then(|| ConfigSetError::EngineNotCompiled { + engine: engine.to_string(), + hint: crate::setup::install_hint::Hint::MacosLinuxOnly.to_string(), + }) +} + /// The LARD problem of the config an editor holds, before it is edited. fn lard_problem(editor: &ConfigEditor) -> Option { crate::setup::lard::problem(&editor.candidate_config().ok()?) @@ -429,10 +440,12 @@ fn lookup(key: &str) -> Result { let spec = found.spec(); if let Some(feature) = spec.requires_feature { if !schema::feature_compiled(feature) { - return Err(ConfigSetError::KeyFeatureNotCompiled { - key: spec.key, - feature, - }); + return Err(macos_engine_missing(feature).unwrap_or( + ConfigSetError::KeyFeatureNotCompiled { + key: spec.key, + feature, + }, + )); } } Ok(found) @@ -893,11 +906,32 @@ gguf_backend = "cpu" let (_dir, path) = temp_config(""); let err = set_engine(path, name).unwrap_err(); match err { - ConfigSetError::FeatureNotCompiled(n) => assert_eq!(n, name), - other => panic!("expected FeatureNotCompiled, got {:?}", other), + ConfigSetError::FeatureNotCompiled(n) if !cfg!(target_os = "macos") => { + assert_eq!(n, name) + } + ConfigSetError::EngineNotCompiled { engine, .. } if cfg!(target_os = "macos") => { + assert_eq!(engine, name) + } + other => panic!("unexpected error for {name}: {:?}", other), } } + /// #632: the macOS release refuses an engine it lacks by naming the + /// engines it has, not with a Cargo rebuild or a Linux variant switch. + #[test] + #[cfg(target_os = "macos")] + fn macos_refusal_names_the_macos_engines() { + let (_dir, path) = temp_config(""); + let message = set_engine(path, "parakeet").unwrap_err().to_string(); + assert!( + message.contains("only the Whisper and Soniox engines"), + "{message}" + ); + assert!(message.contains("Linux-only for now"), "{message}"); + assert!(!message.contains("--features"), "{message}"); + assert!(!message.contains("voxtype info variants"), "{message}"); + } + // --------------------------------------------------------------------- // Generic set/unset // --------------------------------------------------------------------- @@ -1069,11 +1103,14 @@ gguf_backend = "cpu" let (_dir, path) = full_config(); let key = format!("{}.on_demand_loading", engine); let err = set_key(path, &key, "true").unwrap_err(); - match err { - ConfigSetError::KeyFeatureNotCompiled { feature, .. } => { - assert_eq!(feature, *engine) + match &err { + ConfigSetError::KeyFeatureNotCompiled { feature, .. } if !cfg!(target_os = "macos") => { + assert_eq!(feature, engine) + } + ConfigSetError::EngineNotCompiled { engine: e, .. } if cfg!(target_os = "macos") => { + assert_eq!(e, engine) } - other => panic!("expected KeyFeatureNotCompiled, got {:?}", other), + other => panic!("unexpected error for {engine}: {:?}", other), } assert_eq!(err.exit_code(), 2); } diff --git a/src/failure_notice.rs b/src/failure_notice.rs index d04b6f2f..d1864f5f 100644 --- a/src/failure_notice.rs +++ b/src/failure_notice.rs @@ -107,6 +107,17 @@ pub fn model_load_failed( // The running binary lacks the engine. No model download fixes that; // the fix is the one `warn_on_variant_mismatch` gives at startup. if err.to_string().contains("not compiled with --features") { + // The macOS release has no variant to switch to (#632). + if cfg!(target_os = "macos") { + return Notice { + title: format!("Voxtype: {label} engine unavailable"), + body: format!( + "{}. {consequence} {}. Pick a Whisper model with `voxtype setup model`.", + detail(&err.to_string()), + crate::setup::install_hint::MACOS_ENGINES, + ), + }; + } return Notice { title: format!("Voxtype: {label} engine unavailable"), body: format!( @@ -316,6 +327,7 @@ mod tests { } #[test] + #[cfg(not(target_os = "macos"))] fn engine_missing_from_build_points_at_variant_switch() { let config = Config { engine: TranscriptionEngine::Parakeet, @@ -331,6 +343,30 @@ mod tests { assert!(!n.body.contains("--download")); } + /// #632: the macOS release has no ONNX variant, so the notice names the + /// engines it has instead of a Linux variant switch. + #[test] + #[cfg(target_os = "macos")] + fn engine_missing_from_macos_build_names_its_engines() { + let config = Config { + engine: TranscriptionEngine::Parakeet, + ..Default::default() + }; + let err = TranscribeError::InitFailed( + "Parakeet engine requested but voxtype was not compiled with --features parakeet" + .into(), + ); + let n = model_load_failed(&config, "parakeet-tdt-0.6b-v3", &err, true); + assert_eq!(n.title, "Voxtype: Parakeet engine unavailable"); + assert!( + n.body.contains("only the Whisper and Soniox engines"), + "{}", + n.body + ); + assert!(n.body.contains("Linux-only for now"), "{}", n.body); + assert!(!n.body.contains("setup onnx --enable"), "{}", n.body); + } + #[test] fn long_detail_is_clipped() { let long = "x".repeat(500); diff --git a/src/setup/install_hint.rs b/src/setup/install_hint.rs index 55bd10af..a725ef89 100644 --- a/src/setup/install_hint.rs +++ b/src/setup/install_hint.rs @@ -46,6 +46,12 @@ pub fn running_from_nix() -> bool { is_nix_store_path(&exe.canonicalize().unwrap_or(exe)) } +/// What voxtype's macOS release can transcribe with. The macOS workflow +/// builds with `gpu-metal` alone, so only the engines every binary has are in +/// it, and there is no variant to switch to (#632). +pub const MACOS_ENGINES: &str = "The macOS build includes only the Whisper and Soniox engines; \ + the other engines are Linux-only for now"; + /// What the fix has to provide. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Need { @@ -77,6 +83,10 @@ pub enum Hint { package: Option<&'static str>, feature: Option<&'static str>, }, + + /// voxtype's macOS release, which has neither the engine nor a variant + /// that does. + MacosLinuxOnly, } impl fmt::Display for Hint { @@ -133,6 +143,8 @@ impl fmt::Display for Hint { package: None, feature: None, } => write!(f, "build voxtype from source"), + + Hint::MacosLinuxOnly => write!(f, "run voxtype on Linux. {MACOS_ENGINES}"), } } } @@ -393,6 +405,8 @@ pub struct Host<'a> { onnx_pick: fn() -> Variant, method: OnceCell, onnx: OnceCell, + /// The macOS release, where only [`Hint::MacosLinuxOnly`] applies. + macos: bool, } impl<'a> Host<'a> { @@ -421,10 +435,14 @@ impl<'a> Host<'a> { onnx_pick, method: OnceCell::new(), onnx: OnceCell::new(), + macos: false, } } pub fn hint(&self, need: Need) -> Hint { + if self.macos { + return Hint::MacosLinuxOnly; + } if self.nix { return Hint::Nix { package: nix_package(need), @@ -505,12 +523,14 @@ fn system_onnx_pick() -> Variant { impl Host<'static> { /// This machine: the running executable and the package directory. pub fn system() -> Self { - Host::new( + let mut host = Host::new( binary::current_binary_path(), PathBuf::from(binary::LIB_DIR), &SystemRunner, system_onnx_pick, - ) + ); + host.macos = cfg!(target_os = "macos"); + host } } @@ -647,6 +667,63 @@ explicit= assert!(runner.calls.borrow().is_empty()); } + /// #632: the macOS release has no variants and no supported rebuild for + /// the other engines, so every hint names the engines it does have. + #[test] + fn macos_hint_names_the_macos_engines() { + let fx = Fixture::new(None, &[], None); + let runner = runner(&[]); + let mut host = fx.host(&runner); + host.macos = true; + for need in [ + Need::Feature("parakeet"), + Need::Feature("openvino"), + Need::Variant(Variant::OnnxAvx2), + ] { + assert_eq!(host.hint(need), Hint::MacosLinuxOnly, "{need:?}"); + } + let text = Hint::MacosLinuxOnly.to_string(); + assert!(text.starts_with("run voxtype on Linux. "), "{text}"); + assert!( + text.contains("only the Whisper and Soniox engines"), + "{text}" + ); + assert!(text.contains("Linux-only for now"), "{text}"); + assert!(!text.contains("--features"), "{text}"); + assert!(runner.calls.borrow().is_empty()); + } + + /// A Nix build on macOS (nix-darwin) still lacks the engines and the + /// Linux flake packages do not apply, so the macOS hint comes first. + #[test] + fn macos_hint_takes_precedence_over_nix() { + let runner = runner(&[]); + let mut host = nix_host(&runner, PathBuf::from("/nonexistent/usr/lib/voxtype")); + assert!(matches!( + host.hint(Need::Feature("parakeet")), + Hint::Nix { .. } + )); + host.macos = true; + assert_eq!(host.hint(Need::Feature("parakeet")), Hint::MacosLinuxOnly); + assert_eq!( + host.hint(Need::Variant(Variant::WhisperVulkan)), + Hint::MacosLinuxOnly + ); + } + + #[test] + #[cfg(target_os = "macos")] + fn this_macos_host_gives_the_macos_hint() { + assert_eq!(hint(Need::Feature("parakeet")), Hint::MacosLinuxOnly); + assert_eq!(onnx_variant_hint(), Hint::MacosLinuxOnly); + } + + #[test] + #[cfg(not(target_os = "macos"))] + fn linux_hosts_never_give_the_macos_hint() { + assert_ne!(hint(Need::Feature("parakeet")), Hint::MacosLinuxOnly); + } + #[test] fn installed_vulkan_variant_gives_setup_gpu() { let fx = Fixture::new( diff --git a/src/setup/variant_check.rs b/src/setup/variant_check.rs index 4a92ad9a..1a5ac93b 100644 --- a/src/setup/variant_check.rs +++ b/src/setup/variant_check.rs @@ -55,6 +55,10 @@ impl VariantMismatch { .as_deref() .unwrap_or("the running binary"); match (&self.remediation, hint) { + (_, Hint::MacosLinuxOnly) => format!( + "voxtype for macOS does not include the {} engine. To use it, {}.", + self.configured_engine, hint, + ), (Remediation::SwitchToVariant { target: None }, _) => format!( "{} was built without --features {}, and the builds that have it need a CPU \ with AVX2, which this one lacks. Choose an engine the running build supports.", @@ -392,6 +396,49 @@ mod tests { ); } + /// #632: on macOS the explanation names the macOS engines whatever the + /// remediation, Nix and source included, and never suggests a rebuild. + #[test] + fn macos_hint_wins_over_every_remediation() { + let cfg = config_with_engine(TranscriptionEngine::Parakeet); + let mut source = fake_inventory( + InstallKind::Source, + vec![], + Variant::WhisperNative, + Variant::OnnxNative, + ); + let package = fake_inventory( + InstallKind::Package, + vec![], + Variant::WhisperAvx2, + Variant::OnnxAvx2, + ); + let from_source = detect_mismatch(&cfg, &source).expect("source"); + source.binary_path = "/nix/store/abc-voxtype-1.3.1/bin/voxtype".into(); + source.package_lib_dir = None; + let from_nix = detect_mismatch(&cfg, &source).expect("nix"); + assert!(matches!( + from_nix.remediation, + Remediation::NixPackage { .. } + )); + let from_package = detect_mismatch(&cfg, &package).expect("package"); + let no_avx2 = VariantMismatch { + remediation: Remediation::SwitchToVariant { target: None }, + ..from_package.clone() + }; + + for m in [from_source, from_nix, from_package, no_avx2] { + let text = m.explanation_with(&crate::setup::install_hint::Hint::MacosLinuxOnly); + assert!( + text.starts_with("voxtype for macOS does not include the parakeet engine."), + "{text}" + ); + assert!(text.contains("Linux-only for now"), "{text}"); + assert!(!text.contains("--features"), "{text}"); + assert!(!text.contains("flake"), "{text}"); + } + } + #[test] fn every_optional_engine_has_a_required_feature() { // Regression guard: if a new engine is added to TranscriptionEngine