Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 2 additions & 0 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
41 changes: 30 additions & 11 deletions docs/INSTALL_MACOS.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions docs/MACOS_ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
```

Expand Down
2 changes: 2 additions & 0 deletions docs/USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
5 changes: 5 additions & 0 deletions src/app/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
59 changes: 48 additions & 11 deletions src/config_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down Expand Up @@ -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<ConfigSetError> {
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> {
crate::setup::lard::problem(&editor.candidate_config().ok()?)
Expand All @@ -429,10 +440,12 @@ fn lookup(key: &str) -> Result<Found, ConfigSetError> {
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)
Expand Down Expand Up @@ -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
// ---------------------------------------------------------------------
Expand Down Expand Up @@ -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);
}
Expand Down
36 changes: 36 additions & 0 deletions src/failure_notice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down Expand Up @@ -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,
Expand All @@ -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);
Expand Down
Loading
Loading