fix(voice): honor PIPEWIRE_REMOTE in WSL audio detection - #37346
Closed
Solitud1nem wants to merge 1 commit into
Closed
fix(voice): honor PIPEWIRE_REMOTE in WSL audio detection#37346Solitud1nem wants to merge 1 commit into
Solitud1nem wants to merge 1 commit into
Conversation
Contributor
|
Thanks for the focused regression fix. Current The new hermetic WSL test covers the missing case without requiring a WSL runner, while retaining positive PULSE_SERVER and negative no-forwarding cases. The cross-referenced PR #59357 was closed as a duplicate of this canonical fix, not as superseded. Automated hermes-sweeper review. |
teknium1
added a commit
that referenced
this pull request
Jul 28, 2026
- _FakeProc gains returncode (main's player loop checks proc.returncode) - WSL gate tests clear SSH_* env vars (main hard-warns over SSH without forwarded audio) and accept the merged #37346 forwarded-sound-server notice wording - test_tts_macos_output stubs resolve_streaming_provider so the OutputStream setup path actually runs on main's chunked-streamer code - voice CLI integration tests unwrap the _VoiceInputMessage sentinel - _is_wsl: explicit encoding + drop unreachable return (ruff PLW1514)
Contributor
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
- _FakeProc gains returncode (main's player loop checks proc.returncode) - WSL gate tests clear SSH_* env vars (main hard-warns over SSH without forwarded audio) and accept the merged NousResearch#37346 forwarded-sound-server notice wording - test_tts_macos_output stubs resolve_streaming_provider so the OutputStream setup path actually runs on main's chunked-streamer code - voice CLI integration tests unwrap the _VoiceInputMessage sentinel - _is_wsl: explicit encoding + drop unreachable return (ruff PLW1514)
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.
fix(voice): honor PIPEWIRE_REMOTE in WSL audio detection (was PULSE_SERVER-only)
Branch:
fix/voice-wsl-pipewireCommit:
fix(voice): honor forwarded audio (PIPEWIRE_REMOTE) in WSL detectionWhat
In
detect_audio_environment()(tools/voice_mode.py), the WSL detection blocknow honors any forwarded sound server (
has_forwarded_audio=PULSE_SERVERor
PIPEWIRE_REMOTEor a reachable Pulse socket), mirroring the SSH andcontainer blocks. Previously the WSL block checked only
PULSE_SERVER.Why
The SSH block (#35622) and the Docker/container block (#21203) already gate on
has_forwarded_audio, which includesPIPEWIRE_REMOTE. The WSL block was theodd one out — it only looked at
PULSE_SERVER. As a result, a WSL user withPipeWire forwarding (
PIPEWIRE_REMOTEset, noPULSE_SERVER) gets a hard-failwarning and voice mode is blocked, even though audio works.
This surfaced by running the test suite on a real WSL2 machine: the three
TestDetectAudioEnvironment::test_docker_with_pipewire_remote_*tests fail onWSL and pass on Linux CI. Root cause: on WSL
/proc/versioncontainsmicrosoft, so the WSL block runs; withPIPEWIRE_REMOTE(notPULSE_SERVER)it appended a hard-fail warning →
available=False. On Linux CI the WSL block isskipped, so the same tests pass — which is why this slipped through.
Change
tools/voice_mode.py: WSL block useshas_forwarded_audioinstead of onlyos.environ.get('PULSE_SERVER'); notice/warning text updated to mention thePipeWire option (consistent with the container block).
How to test
The new
test_wsl_with_pipewire_remote_allows_voicefails on currentmain(
availableisFalsedue to the WSL warning) and passes with this change.Complementary tests confirm
PULSE_SERVERstill works and that WSL withoutany forwarding is still correctly blocked.
Verification done
main(proven via stash).tests/tools/test_voice_mode.py: no regression from this change (the WSLpipewire cases now pass; any
TestPulseSocketReachablefailures arepre-existing environment artifacts — that function is untouched here).
ruff --select F,PLW1514andscripts/check-windows-footguns.pyon changedfiles: clean.
Platforms
Fixes WSL2 (Python 3.11). No-op on non-WSL hosts (the block only runs when
/proc/versioncontainsmicrosoft); Linux/macOS behavior unchanged.Scope
One block change + a regression test. Completes the SSH (#35622) / container
(#21203) audio-forwarding pattern for WSL.