fix(voice): honor PULSE_SERVER/PIPEWIRE_REMOTE inside Docker (#21203)#22534
Merged
benbarclay merged 2 commits intoMay 27, 2026
Merged
Conversation
…earch#21203) detect_audio_environment() unconditionally added a hard warning when running inside a container, blocking /voice on even when the host audio socket was correctly forwarded (PulseAudio or PipeWire) and sounddevice could enumerate devices. Mirror the existing WSL/PulseAudio handling: if PULSE_SERVER or PIPEWIRE_REMOTE is set, downgrade to a notice and let the audio backend decide. When neither is set, keep the block but extend the message with the exact -v / -e flags users need. Closes NousResearch#21203
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes voice-mode environment detection inside Docker/Podman containers so /voice on is not blocked when host PulseAudio/PipeWire forwarding is configured via PULSE_SERVER and/or PIPEWIRE_REMOTE (issue #21203).
Changes:
- Downgrade the container warning to an informational notice when
PULSE_SERVERorPIPEWIRE_REMOTEis set. - Keep the hard block when running in a container without audio forwarding, and extend the warning with suggested Docker flags.
- Add 3 regression tests covering container scenarios with/without forwarding.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
tools/voice_mode.py |
Adjusts container detection messaging/behavior to allow voice when audio forwarding env vars are present. |
tests/tools/test_voice_mode.py |
Adds regression tests for Docker container audio forwarding scenarios. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+233
to
+236
| assert result["available"] is True | ||
| assert result["warnings"] == [] | ||
| assert any("Docker" in n for n in result.get("notices", [])) | ||
|
|
Comment on lines
+251
to
+254
| assert result["available"] is True | ||
| assert result["warnings"] == [] | ||
| assert any("Docker" in n for n in result.get("notices", [])) | ||
|
|
1 task
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…mode-docker-respect-pulse-pipewire fix(voice): honor PULSE_SERVER/PIPEWIRE_REMOTE inside Docker (NousResearch#21203)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
detect_audio_environment()unconditionally added a hard warning when running inside a Docker/Podman container, blocking/voice oneven when the host PulseAudio/PipeWire socket was correctly mounted andsounddevicecould enumerate devices (issue #21203).Root cause
The detailed rationale from the original PR body is preserved below. This template update keeps the review structure consistent with #29640.
Fix
Mirror the existing WSL/PulseAudio handling at
tools/voice_mode.py:110-125:is_container()andPULSE_SERVERorPIPEWIRE_REMOTEis set → downgrade to an informationalnoticesentry (does not block voice).is_container()and neither is set → keep the hard block, but extend the message with the exact-v/-eflags users need.No public surface changes.
detect_audio_environment()still returns{available, warnings, notices}.Why this shape
This shape mirrors #29640 so reviewers can quickly compare scope, root cause, fix, tests, and related context without having to decode a custom PR description.
Tests
Original body
Related PRs / issues
Closes #21203
Original body
Summary
detect_audio_environment()unconditionally added a hard warning when running inside a Docker/Podman container, blocking/voice oneven when the host PulseAudio/PipeWire socket was correctly mounted andsounddevicecould enumerate devices (issue #21203).What Changed
Fluxo
A mudança continua seguindo o fluxo original descrito na seção preservada abaixo, sem ampliar o escopo funcional deste PR.
Visão
A padronização melhora a revisão, reduz ruído e evita deriva de formatação entre PRs abertos.
Test Plan
Original body
What does this PR do?
Summary
detect_audio_environment()unconditionally added a hard warning when running inside a Docker/Podman container, blocking/voice oneven when the host PulseAudio/PipeWire socket was correctly mounted andsounddevicecould enumerate devices (issue #21203).Fix
Mirror the existing WSL/PulseAudio handling at
tools/voice_mode.py:110-125:is_container()andPULSE_SERVERorPIPEWIRE_REMOTEis set → downgrade to an informationalnoticesentry (does not block voice).is_container()and neither is set → keep the hard block, but extend the message with the exact-v/-eflags users need.No public surface changes.
detect_audio_environment()still returns{available, warnings, notices}.Test plan
tests/tools/test_voice_mode.py::TestDetectAudioEnvironment:test_docker_with_pulse_server_allows_voicetest_docker_with_pipewire_remote_allows_voicetest_docker_without_audio_forwarding_blocks_voiceorigin/main, pass with the fix.tests/tools/test_voice_mode.py: 63/63 pass.Closes #21203
Solution Sketch
Related Issue
Closes #21203
Type of Change
Changes Made
.github/PULL_REQUEST_TEMPLATE.mdHow to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Generated by Hermes Turbo
Generated by Hermes Turbo