hermes - 💡(How to fix) Fix TUI voice mode: Python crash on 2nd transcription (cTranslate2/OpenBLAS threading conflict) [3 comments, 2 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#15462Fetched 2026-04-25 06:22:37
View on GitHub
Comments
3
Participants
2
Timeline
11
Reactions
0
Author
Participants
Timeline (top)
labeled ×4commented ×3mentioned ×2subscribed ×2

Root Cause

TUI uses hermes_cli/voice.py with start_continuous(). The 2nd transcription crashes — likely accumulated state in cTranslate2/OpenBLAS thread pool. CLI ancient avoids this because each transcription runs in a fresh thread that terminates.

Fix Action

Workaround

Use CLI ancient (without --tui). Voice mode works correctly there.

Code Example

frame.abi3.so + CFFI + libportaudio + scipy_openblas
__pyx_pf_2av_5frame_5Frame_2__dealloc__
PyThread_acquire_lock_timed + _queue.cpython-311
epoll_wait + libspa-support.so + libpipewire-0.3
RAW_BUFFERClick to expand / collapse

Bug Description

TUI voice mode crashes Python process on the 2nd transcription attempt. First transcription works, 2nd always crashes with SIGABRT.

CLI ancient (without --tui) works correctly — no crashes, Ctrl+B stops and transcribes, auto-stop by silence works, TTS works.

Steps to Reproduce

  1. Start Hermes with TUI: hermes --tui
  2. Enable voice mode: /voice on
  3. Press Ctrl+B to start recording, speak, press Ctrl+B to stop — 1st transcription works ✓
  4. Press Ctrl+B again to start new recording, speak briefly, press Ctrl+B — Python crashes (SIGABRT)

Environment

  • OS: Linux (openSUSE Tumbleweed)
  • Hermes: latest from NousResearch/hermes-agent
  • Python: 3.11
  • Audio: sounddevice + PortAudio + PipeWire
  • STT: faster-whisper (local, GPU)

Crash Stack Trace

frame.abi3.so + CFFI + libportaudio + scipy_openblas
__pyx_pf_2av_5frame_5Frame_2__dealloc__
PyThread_acquire_lock_timed + _queue.cpython-311
epoll_wait + libspa-support.so + libpipewire-0.3

Multiple threads: libgomp, blas_thread_server, ctranslate2 Worker, libpipewire.

Root Cause

TUI uses hermes_cli/voice.py with start_continuous(). The 2nd transcription crashes — likely accumulated state in cTranslate2/OpenBLAS thread pool. CLI ancient avoids this because each transcription runs in a fresh thread that terminates.

Workaround

Use CLI ancient (without --tui). Voice mode works correctly there.

Severity

Medium — TUI voice unusable. CLI ancient is working alternative.

extent analysis

TL;DR

The most likely fix is to modify the hermes_cli/voice.py to properly clean up the accumulated state in the cTranslate2/OpenBLAS thread pool after each transcription.

Guidance

  • Investigate the start_continuous() function in hermes_cli/voice.py to identify the source of the accumulated state.
  • Verify that the thread pool is being properly terminated or reset after each transcription attempt.
  • Consider adding a mechanism to clean up the thread pool state before starting a new transcription, such as calling a reset() or cleanup() function.
  • Review the crash stack trace to ensure that the issue is indeed related to the thread pool and not a separate issue with the audio or STT components.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The provided workaround of using the CLI ancient version without --tui suggests that the issue is specific to the TUI implementation and not a fundamental problem with the transcription functionality.

Recommendation

Apply workaround: Use CLI ancient (without --tui) until a proper fix can be implemented, as it provides a working alternative for voice mode functionality.

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

hermes - 💡(How to fix) Fix TUI voice mode: Python crash on 2nd transcription (cTranslate2/OpenBLAS threading conflict) [3 comments, 2 participants]