Skip to content

feat: optional whisper, fix 1.7b model loading & tray error state - #106

Merged
jafreck merged 2 commits into
mainfrom
feat/optional-whisper
Apr 5, 2026
Merged

feat: optional whisper, fix 1.7b model loading & tray error state#106
jafreck merged 2 commits into
mainfrom
feat/optional-whisper

Conversation

@jafreck

@jafreck jafreck commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Summary

Make whisper-rs an optional dependency behind a whisper feature flag, fix Qwen3-ASR 1.7b model loading, distinguish the tray Error state from Recording, and fix flaky config tests.

Optional Whisper (whisper feature flag)

  • whisper-rs is now optional = true in murmur-core, gated behind a new whisper feature
  • Default features changed to [onnx] — Qwen3-ASR is the default, slim builds exclude whisper entirely
  • metal/cuda/vulkan features imply whisper (they're whisper-rs hardware backends)
  • murmur-whisper-worker binary uses required-features = ["whisper"]
  • Source modules (transcriber.rs, whisper_engine.rs, prompt::rank_vocabulary) gated with #[cfg(feature = "whisper")]
  • Factory returns clear error message when Whisper backend is used without the feature
  • Wake word detection gracefully degrades (requires whisper feature for the tiny.en model)

Fix Qwen3-ASR 1.7b model loading

The 1.7b model's config.json uses a nested structure (decoder.hidden_size = 2048) but the parser only read the top-level hidden_size, defaulting to 1024. This caused Got invalid dimensions for input: input_embeds errors during inference. The 0.6b model worked only by coincidence (its decoder hidden_size happens to be 1024).

Fix tray Error vs Recording icon

Error state previously used the same red icon as Recording, making failed engine loads look like stuck recordings. Error now uses the idle icon, and the error message is shown in the tray status text.

Fix flaky tests

test_cmd_set_model_valid and test_cmd_set_model_prints_download_hint raced on the shared config file. Fixed by adding a CONFIG_MUTEX for test serialization and eliminating the double Config::load() TOCTOU in cmd_set_model.

Build configurations

Config Command
Slim (Qwen3 only) cargo build -p murmur
Full macOS cargo build -p murmur --features metal
Explicit whisper cargo build -p murmur --features whisper

@jafreck
jafreck merged commit dbd9ef7 into main Apr 5, 2026
5 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.

1 participant