Skip to content

The agent that grows with you

fix(wake): exclude the ARM-only engine on Intel macOS

ethernetc0fc5bb99364
diff --git a/pyproject.toml b/pyproject.toml
index d79745a0694..23c79e51f32 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -252,23 +252,13 @@ voice = [
"sounddevice==0.5.5",
"numpy==2.4.3",
]
-# "Hey Hermes" wake word — on-device hotword detection. All engines are
-# optional; openWakeWord (ONNX) is the free default, sherpa-onnx adds
-# open-vocabulary phrases (any typed phrase, zero training), Porcupine is
-# the premium alternative. Desktop installs ([--include-desktop]) eager-install
-# [wake]+[voice] so the ear works instantly; CLI-only installs lazy-install on
-# first /wake; mirrored in tools/lazy_deps.py.
+# Wake engines are optional. Bundles include the engines supported by their
+# target. PM installs the selected engine on first use for source installs.
wake = [
- # pyopen-wakeword (rhasspy's maintained fork of openWakeWord) — py3 wheels
- # plus a bundled tensorflowlite_c lib. Loads the shipped hey_hermes.tflite
- # and bundles the SAME shared feature models openwakeword's download_models()
- # fetched at runtime (byte-identical v0.5.1 melspectrogram/embedding, verified
- # by hash). Replaces openwakeword + onnxruntime + ai-edge-litert: upstream
- # tflite-runtime (a hard openwakeword dep on linux) has no cp312+ wheels
- # (caps at cp311), which is why the old requires-python ceiling existed.
- # No win32-arm64 wheel: gate it there like sherpa-onnx; porcupine still
- # covers wake on that target.
- "pyopen-wakeword==1.1.0; platform_machine != 'ARM64' or sys_platform != 'win32'",
+ # pyopen-wakeword includes the TFLite library and shared feature models.
+ # Its universal2 wheel contains an ARM64-only library, so Intel Macs cannot
+ # load it. There is no native Windows ARM64 wheel either.
+ "pyopen-wakeword==1.1.0; (platform_machine != 'ARM64' or sys_platform != 'win32') and (platform_machine != 'x86_64' or sys_platform != 'darwin')",
# sherpa-onnx ships win_amd64/win32 wheels only (its kaldi-decoder C++ has
# no win_arm64 build), so win32-arm64 would build the sdist and fail. Gate
# it off there like faster-whisper; the other engines still ship.
@@ -293,7 +283,7 @@ audio-io = ["sounddevice==0.5.5", "numpy==2.4.3"]
silk = ["pilk==0.2.4"]
# Wake-engine sub-extras — lazy per-engine installs so a user who only wants
# sherpa-onnx doesn't pull the whole [wake] bundle. Pins match [wake].
-wake-openwakeword = ["pyopen-wakeword==1.1.0; platform_machine != 'ARM64' or sys_platform != 'win32'"]
+wake-openwakeword = ["pyopen-wakeword==1.1.0; (platform_machine != 'ARM64' or sys_platform != 'win32') and (platform_machine != 'x86_64' or sys_platform != 'darwin')"]
wake-sherpa = ["sherpa-onnx==1.13.4; platform_machine != 'ARM64' or sys_platform != 'win32'"]
wake-porcupine = ["pvporcupine==4.0.3"]
# Google Chat service account push (gateway/platforms/google_chat) — pubsub
@@ -488,6 +478,9 @@ matrix = "sys_platform == 'linux'"
google-chat = "platform_machine != 'ARM64' or sys_platform != 'win32'"
# qdrant-client → grpcio (via mem0ai) has no win_arm64 wheel.
mem0 = "platform_machine != 'ARM64' or sys_platform != 'win32'"
+# Match the engine dependency markers so PM refuses an unsupported install.
+wake-openwakeword = "(platform_machine != 'ARM64' or sys_platform != 'win32') and (platform_machine != 'x86_64' or sys_platform != 'darwin')"
+wake-sherpa = "platform_machine != 'ARM64' or sys_platform != 'win32'"
[tool.uv]
override-dependencies = [
diff --git a/tests/test_project_metadata.py b/tests/test_project_metadata.py
index 22888d60233..e6146824583 100644
--- a/tests/test_project_metadata.py
+++ b/tests/test_project_metadata.py
@@ -17,6 +17,41 @@ def _load_package_data():
return tool["setuptools"]["package-data"]
+def test_wake_dependencies_and_runtime_gate_agree_on_supported_targets():
+ from packaging.markers import Marker, default_environment
+ from packaging.requirements import Requirement
+
+ root = Path(__file__).resolve().parents[1]
+ metadata = tomllib.loads((root / "pyproject.toml").read_text(encoding="utf-8-sig"))
+ optional = metadata["project"]["optional-dependencies"]
+ gates = metadata["tool"]["hermes"]["extras-platforms"]
+ targets = [
+ ("darwin", "Darwin", "x86_64", False),
+ ("darwin", "Darwin", "arm64", True),
+ ("linux", "Linux", "x86_64", True),
+ ("linux", "Linux", "aarch64", True),
+ ("win32", "Windows", "AMD64", True),
+ ("win32", "Windows", "ARM64", False),
+ ]
+ for system, platform_system, machine, supported in targets:
+ environment = {**default_environment(), "sys_platform": system,
+ "platform_system": platform_system, "platform_machine": machine}
+ for extra in ("wake", "wake-openwakeword"):
+ requirement = next(req for spec in optional[extra]
+ if (req := Requirement(spec)).name == "pyopen-wakeword")
+ assert requirement.marker.evaluate(environment) is supported, (extra, system, machine)
+ assert Marker(gates["wake-openwakeword"]).evaluate(environment) is supported
+ if system == "darwin":
+ selected = {req.name for spec in optional["wake"]
+ if (req := Requirement(spec)).marker is None or req.marker.evaluate(environment)}
+ assert {"sherpa-onnx", "pvporcupine"} <= selected
+ for extra in ("wake-sherpa", "wake-porcupine"):
+ assert all(req.marker is None or req.marker.evaluate(environment)
+ for req in map(Requirement, optional[extra]))
+ gate = gates.get(extra)
+ assert gate is None or Marker(gate).evaluate(environment)
+
+
def test_direct_overrides_preserve_the_declared_exact_version():
from packaging.requirements import Requirement
diff --git a/tests/tools/test_wake_word.py b/tests/tools/test_wake_word.py
index 8d3421b856c..2d35e3cdf0b 100644
--- a/tests/tools/test_wake_word.py
+++ b/tests/tools/test_wake_word.py
@@ -100,6 +100,7 @@ def _voice_loop_ready(monkeypatch, stt=True, tts=True):
test venv's installed voice stack."""
monkeypatch.setattr(ww, "_stt_ready", lambda: stt)
monkeypatch.setattr(ww, "_tts_ready", lambda: tts)
+ monkeypatch.setattr("pm.extras._PLATFORM_GATES", {})
def test_requirements_openwakeword_available(monkeypatch):
@@ -173,6 +174,31 @@ def test_requirements_fresh_install_lazy_allowed(monkeypatch):
assert r["hint"] == ""
[email protected]("capture", ["local", "client"])
[email protected]("provider", ["openwakeword", "oww", "local"])
+def test_requirements_reject_unsupported_engine_without_attempting_install(monkeypatch, capture, provider):
+ import pm.extras as extras
+
+ _voice_loop_ready(monkeypatch)
+ monkeypatch.setattr(extras, "_PLATFORM_GATES", {"wake-openwakeword": "python_version < '0'"})
+ monkeypatch.setattr(extras, "_importable", lambda anchor: False)
+ monkeypatch.setattr(pm_ensure, "lazy_installs_allowed", lambda: True)
+ monkeypatch.setenv("PORCUPINE_ACCESS_KEY", "test-key")
+
+ def no_install(*args, **kwargs):
+ pytest.fail("a requirements probe must not install dependencies")
+
+ monkeypatch.setattr(pm_ensure, "sync_venv", no_install)
+ result = ww.check_wake_word_requirements({"provider": provider, "capture": capture})
+ assert result["available"] is False
+ assert "not supported" in result["hint"]
+ assert "wake_word.provider" in result["hint"]
+ assert "sherpa" in result["hint"] and "porcupine" in result["hint"]
+ assert "uv sync" not in result["hint"]
+ for alternative in ("sherpa", "porcupine"):
+ assert ww.check_wake_word_requirements({"provider": alternative, "capture": capture})["available"] is True
+
+
def test_requirements_lazy_disabled_returns_remedy_not_nameerror(monkeypatch):
"""Deps missing + lazy installs disabled → unavailable WITH a remedy hint.
diff --git a/tools/wake_word.py b/tools/wake_word.py
index 9472ec9109e..46c8a2f5ecb 100644
--- a/tools/wake_word.py
+++ b/tools/wake_word.py
@@ -645,6 +645,7 @@ def check_wake_word_requirements(cfg: Optional[Dict[str, Any]] = None) -> Dict[s
provider = _provider(cfg)
import pm
from pm.ensure import lazy_installs_allowed
+ from pm.extras import extra_supported
if provider == "porcupine":
feature = "wake-porcupine"
@@ -653,6 +654,7 @@ def check_wake_word_requirements(cfg: Optional[Dict[str, Any]] = None) -> Dict[s
else:
feature = "wake-openwakeword"
deps_ok = pm.available(feature)
+ supported = deps_ok or extra_supported(feature)
lazy_ok = lazy_installs_allowed()
# The audio probe imports sounddevice + numpy — two of the very packages
# the lazy installer would fetch — so it can only be trusted once the
@@ -670,7 +672,13 @@ def check_wake_word_requirements(cfg: Optional[Dict[str, Any]] = None) -> Dict[s
tts_ok = _tts_ready()
hint = ""
- if provider == "porcupine" and not (os.getenv("PORCUPINE_ACCESS_KEY") or "").strip():
+ if not supported:
+ alternatives = [name for name in ("sherpa", "porcupine")
+ if extra_supported(_PROVIDERS[name][1])]
+ hint = f"The {provider} wake engine is not supported on this platform."
+ if alternatives:
+ hint += f" Set wake_word.provider to {' or '.join(alternatives)}."
+ elif provider == "porcupine" and not (os.getenv("PORCUPINE_ACCESS_KEY") or "").strip():
key_ok = False
hint = "Set PORCUPINE_ACCESS_KEY (free key at https://console.picovoice.ai)."
elif not deps_ok and not lazy_ok:
@@ -697,7 +705,7 @@ def check_wake_word_requirements(cfg: Optional[Dict[str, Any]] = None) -> Dict[s
"build with client-capture wake support.")
return {
- "available": key_ok and stt_ok and tts_ok and mic_ok, "provider": provider,
+ "available": supported and key_ok and stt_ok and tts_ok and mic_ok, "provider": provider,
"deps_available": deps_ok, "audio_available": audio_ok,
"local_input_available": _local_input_device_ready() if deps_ok else False,
"capture": capture_mode, "access_key_set": key_ok, "stt_available": stt_ok, "tts_available": tts_ok,
diff --git a/uv.lock b/uv.lock
index 8b284bfac37..019ae3a9f5d 100644
--- a/uv.lock
+++ b/uv.lock
@@ -1806,13 +1806,13 @@ voice = [
wake = [
{ name = "numpy" },
{ name = "pvporcupine" },
- { name = "pyopen-wakeword", marker = "platform_machine != 'ARM64' or sys_platform != 'win32'" },
+ { name = "pyopen-wakeword", marker = "(platform_machine != 'x86_64' and sys_platform == 'darwin') or (platform_machine != 'ARM64' and sys_platform == 'win32') or (sys_platform != 'darwin' and sys_platform != 'win32')" },
{ name = "sentencepiece" },
{ name = "sherpa-onnx", marker = "platform_machine != 'ARM64' or sys_platform != 'win32'" },
{ name = "sounddevice" },
]
wake-openwakeword = [
- { name = "pyopen-wakeword", marker = "platform_machine != 'ARM64' or sys_platform != 'win32'" },
+ { name = "pyopen-wakeword", marker = "(platform_machine != 'x86_64' and sys_platform == 'darwin') or (platform_machine != 'ARM64' and sys_platform == 'win32') or (sys_platform != 'darwin' and sys_platform != 'win32')" },
]
wake-porcupine = [
{ name = "pvporcupine" },
@@ -1943,8 +1943,8 @@ requires-dist = [
{ name = "pyasn1", marker = "extra == 'google'", specifier = "==0.6.4" },
{ name = "pydantic", specifier = "==2.13.4" },
{ name = "pyjwt", extras = ["crypto"], specifier = "==2.13.0" },
- { name = "pyopen-wakeword", marker = "(platform_machine != 'ARM64' and extra == 'wake') or (sys_platform != 'win32' and extra == 'wake')", specifier = "==1.1.0" },
- { name = "pyopen-wakeword", marker = "(platform_machine != 'ARM64' and extra == 'wake-openwakeword') or (sys_platform != 'win32' and extra == 'wake-openwakeword')", specifier = "==1.1.0" },
+ { name = "pyopen-wakeword", marker = "(platform_machine != 'x86_64' and sys_platform == 'darwin' and extra == 'wake') or (platform_machine != 'ARM64' and sys_platform == 'win32' and extra == 'wake') or (sys_platform != 'darwin' and sys_platform != 'win32' and extra == 'wake')", specifier = "==1.1.0" },
+ { name = "pyopen-wakeword", marker = "(platform_machine != 'x86_64' and sys_platform == 'darwin' and extra == 'wake-openwakeword') or (platform_machine != 'ARM64' and sys_platform == 'win32' and extra == 'wake-openwakeword') or (sys_platform != 'darwin' and sys_platform != 'win32' and extra == 'wake-openwakeword')", specifier = "==1.1.0" },
{ name = "pytest", marker = "extra == 'dev'", specifier = "==9.1.1" },
{ name = "pytest-asyncio", marker = "extra == 'dev'", specifier = "==1.3.0" },
{ name = "python-dotenv", specifier = "==1.2.2" },
diff --git a/website/docs/user-guide/features/wake-word.md b/website/docs/user-guide/features/wake-word.md
index 6c2c6efbb2c..1a0caa1129f 100644
--- a/website/docs/user-guide/features/wake-word.md
+++ b/website/docs/user-guide/features/wake-word.md
@@ -76,7 +76,7 @@ backend process.
| Engine | Cost | API key | Notes |
|--------|------|---------|-------|
-| **openWakeWord** (default) | Free | None | TFLite through `pyopen-wakeword`. Includes the **"hey hermes"** model. Custom models require a `.tflite` file. Not available on native Windows ARM64. |
+| **openWakeWord** (default) | Free | None | TFLite through `pyopen-wakeword`. Includes the **"hey hermes"** model. Custom models require a `.tflite` file. Not available on Intel macOS or native Windows ARM64. |
| **sherpa** | Free | None | Open-vocabulary detection for typed phrases. Downloads an English model on first use. Not available on native Windows ARM64. |
| **Porcupine** | Free tier / paid | `PORCUPINE_ACCESS_KEY` | Picovoice engine; built-in keywords + custom `.ppn` files |
@@ -89,13 +89,19 @@ wake-word detection. `security.allow_lazy_installs` controls this installation.
A new dependency environment can require a Hermes restart before the engine loads.
Packaged builds include the engine dependencies supported by their target.
+On Intel macOS, select sherpa with `hermes config set wake_word.provider sherpa`,
+or select Porcupine and configure its access key. The `pyopen-wakeword` macOS
+wheel contains an ARM64-only library despite its `universal2` label. Hermes
+excludes that engine on Intel Macs and does not change your selected provider
+automatically.
+
On native Windows ARM64, use Porcupine with an access key. The default
openWakeWord engine and sherpa are excluded from that target.
-The published `pyopen-wakeword` wheels target macOS 15 or later, glibc Linux
-2.35 or later, and Windows x64. These are engine-wheel requirements, not a
-blanket support statement for every Hermes feature. Termux's core/ACP package
-does not include this wake stack.
+The supported `pyopen-wakeword` wheels target Apple Silicon with macOS 15 or
+later, glibc Linux 2.35 or later, and Windows x64. These requirements apply to
+that engine, not every Hermes feature. Termux's core/ACP package does not
+include this wake stack.
## Quick start