hermes - 💡(How to fix) Fix [Bug]: no audio device error in hermes chat

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…

Error Message

I am encountering a persistent no audio device error when running Hermes v0.12.0 in a Docker container on a Linux host. Hermes should detect the PulseAudio backend and use the specified default device (index 19) or the system default without error. Hermes chat voice on with the error: no audio device.

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Code Example

/voice

Voice mode unavailable in this environment:
  Running inside Docker container -- no audio devices
 ⚕ claude-opus-4.6 │ ctx --[░░░░░░░░░░] -- │ 4m │ ⏲ 0s

---
RAW_BUFFERClick to expand / collapse

Bug Description

I am encountering a persistent no audio device error when running Hermes v0.12.0 in a Docker container on a Linux host.

The environment is correctly configured to pass through the host's audio system (PipeWire/PulseAudio). I have verified that the audio subsystem is fully functional inside the container using standard tools and Python scripts. However, Hermes chat /voice on to initialize audio.

Steps to Reproduce

1.Run a Docker container with the following audio configuration:

•Mount PulseAudio socket: -v /run/user/1000/pulse/native:/run/user/1000/pulse/native

•Mount XDG runtime dir: -v /run/user/1000:/run/user/1000

•Set env vars: PULSE_SERVER=unix:/run/user/1000/pulse/native and XDG_RUNTIME_DIR=/run/user/1000 2.Inside the container, verify audio functionality:

•Run pactl info: Success (Connects to server).

•Run python3 -c "import sounddevice; print(sounddevice.query_devices())": Success (Lists devices).

•Run a test script to play sound: Success (Confirmed output device index is 19). 3.Set environment variables for Hermes:

•SOUNDDEVICE_DEVICE=19

•SOUNDDEVICE_API=PulseAudio 4.Start Hermes Chat/Agent.

Expected Behavior

Hermes should detect the PulseAudio backend and use the specified default device (index 19) or the system default without error.

Actual Behavior

Hermes chat voice on with the error: no audio device.

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

/voice

Voice mode unavailable in this environment:
  Running inside Docker container -- no audio devices
 ⚕ claude-opus-4.6 │ ctx -- │ [░░░░░░░░░░] -- │ 4m │ ⏲ 0s

Operating System

ubantu24.04

Python Version

No response

Hermes Version

v0.12.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

I have performed extensive debugging which suggests this is a bug in how Hermes (or the underlying sounddevice/PortAudio library) initializes the audio backend in a containerized environment.

1.Environment Variables Ignored: Even though SOUNDDEVICE_DEVICE=19 is set and visible in the container environment, Hermes still fails. This suggests the library might be initializing before the environment variable is read, or Hermes is overriding it. 2.Hardcoded Device Index: It appears the application or library might be defaulting to device index 0 (typically a physical ALSA card which doesn't exist in the container) instead of respecting the PulseAudio virtual device. 3.Verification: My Python diagnostic script proves that sounddevice can work on device 19, so the issue is specific to Hermes' initialization sequence.

Proposed Fix (optional)

The initialization logic for sounddevice needs to be more robust in handling non-zero default devices or environments where physical cards are absent.

1.Ensure Environment Variable Compliance: Ensure sounddevice reads SOUNDDEVICE_DEVICE at the very start of execution. 2.Auto-Detection: If device 0 is unavailable, the code should automatically fall back to querying available devices (like pactl does) rather than failing immediately. 3.Explicit Configuration: Allow users to pass the device index via CLI arguments (e.g., hermes --audio-device 19)

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

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