hermes - ✅(Solved) Fix Gateway voice notes crash Python on Apple Silicon/Rosetta local STT [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#28622Fetched 2026-05-20 04:03:08
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Error Message

procName: Python coalitionName: ai.hermes.gateway translated: true exception: EXC_CRASH / SIGABRT termination: Abort trap: 6 faulting stack includes: __kmp_abort_process

Root Cause

Suspected Root Cause

Fix Action

Fixed

PR fix notes

PR #28624: fix: avoid local STT crash on Apple Silicon

Description (problem / solution / changelog)

Summary

  • Detect macOS Apple Silicon/Rosetta before loading local faster-whisper
  • Force local STT to CPU/int8 on that path to avoid native device="auto" crashes
  • Set KMP_DUPLICATE_LIB_OK before importing faster_whisper for the affected path because the crash can happen during import via duplicate Intel OpenMP runtimes
  • Relax the voice extra NumPy pin to <2 because the current NumPy 2.x pin emits compatibility warnings with the installed torch/ctranslate2 stack
  • Add regression coverage for Rosetta detection and CPU-only model loading

Fixes #28622

Test Plan

  • python -m pytest tests/tools/test_transcription_tools.py -q -o 'addopts='
  • Manual local transcription on affected Mac/Rosetta environment:
    • force_cpu True
    • Result: {'success': True, 'transcript': 'Hello, one, two, three. Can you hear me?', 'provider': 'local'}
  • Restarted Hermes gateway and confirmed no new Python crash report was created during restart

Changed files

  • pyproject.toml (modified, +1/-1)
  • tests/tools/test_transcription_tools.py (modified, +47/-0)
  • tools/transcription_tools.py (modified, +52/-0)

Code Example

procName: Python
coalitionName: ai.hermes.gateway
translated: true
exception: EXC_CRASH / SIGABRT
termination: Abort trap: 6
faulting stack includes: __kmp_abort_process

---

Python-2026-05-19-084427.ips
Python-2026-05-19-084836.ips
Python-2026-05-19-085950.ips
Python-2026-05-19-091144.ips
Python-2026-05-19-091521.ips

---

WhisperModel(model_name, device="auto", compute_type="auto")

---

WhisperModel(model_name, device="cpu", compute_type="int8")
RAW_BUFFERClick to expand / collapse

Bug Description

Sending a voice note through the Hermes gateway on Apple Silicon causes the gateway Python process to hard-crash with a macOS "Python quit unexpectedly" dialog instead of transcribing the audio.

This appears to be the local STT path using faster-whisper / ctranslate2 with device="auto". On this machine, ctranslate2 aborts inside Intel OpenMP while the Python process is running x86_64 under Rosetta.

Steps to Reproduce

  1. Run Hermes gateway as a launchd service on macOS Apple Silicon.
  2. Configure/use local STT via faster-whisper.
  3. Send a Telegram voice note to Hermes.
  4. Observe that the voice note is cached, then the gateway/Python process crashes.

Expected Behavior

Voice notes should either:

  • Transcribe successfully, or
  • Fail gracefully and fall back to another STT provider/return an error.

The gateway should not terminate.

Actual Behavior

macOS shows a crash dialog for Python. Hermes gateway restarts, but every subsequent voice note reproduces the crash.

Crash signature from ~/Library/Logs/DiagnosticReports/Python-2026-05-19-091521.ips:

procName: Python
coalitionName: ai.hermes.gateway
translated: true
exception: EXC_CRASH / SIGABRT
termination: Abort trap: 6
faulting stack includes: __kmp_abort_process

Earlier reports on the same machine show the same signature:

Python-2026-05-19-084427.ips
Python-2026-05-19-084836.ips
Python-2026-05-19-085950.ips
Python-2026-05-19-091144.ips
Python-2026-05-19-091521.ips

Environment

  • Hermes gateway process: hermes_cli.main gateway run --replace
  • OS: macOS 26.3.1, build 25D2128
  • Hardware: Apple Silicon Mac, model Mac16,10
  • Python: 3.11.15 from /usr/local/Cellar/[email protected]/
  • Python process architecture: x86_64 translated under Rosetta (translated: true in crash report)
  • STT path: local faster-whisper

Suspected Root Cause

tools/transcription_tools.py::_load_local_whisper_model() currently tries:

WhisperModel(model_name, device="auto", compute_type="auto")

On this Apple Silicon/Rosetta setup, the device="auto" path can trigger a native abort in the backend before Python can catch an exception. Existing CUDA fallback logic only handles Python exceptions, so it cannot recover from SIGABRT.

Proposed Fix

Detect Apple Silicon/macOS Rosetta before loading faster-whisper and use CPU directly:

WhisperModel(model_name, device="cpu", compute_type="int8")

This avoids the GPU/Metal/OpenMP autodetection path that is crashing.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING