Skip to content

Fix: Discover Audio Runtime for PipeWire - #6

Merged
silverfoxy merged 2 commits into
silverfoxy:masterfrom
thijsdaniels:fix/pipewire-audio-discovery
Sep 28, 2026
Merged

silverfoxy merged 2 commits into
silverfoxy:masterfrom
thijsdaniels:fix/pipewire-audio-discovery

Conversation

@thijsdaniels

Copy link
Copy Markdown
Contributor

Summary

When Decktation runs with "flags": ["root"] under systemd (PluginLoader), the backend process runs as root (UID 0) and does not inherit the desktop session's XDG_RUNTIME_DIR.

Because of this, PortAudio / PipeWire cannot connect to the user session audio daemon at /run/user/<UID>/pipewire-0 and falls back to unpopulated raw ALSA hardware inputs. This caused the audio stream to record silence (leading to VAD filtering out 100% of captured audio and no transcription being generated).

Changes

  • Added runtime directory discovery in decktation_backend.py and wow_voice_chat.py before sounddevice / PortAudio is initialized.
  • Scans for the active user's runtime directory (/run/user/<UID>/pipewire-0) and sets XDG_RUNTIME_DIR, PIPEWIRE_RUNTIME_DIR, and PULSE_SERVER.
  • Allows PortAudio to connect directly to the active PipeWire session as a native client.

Testing

  • Tested on Bazzite Linux / SteamOS: verified that PluginLoader connects to PipeWire and captures directly from whatever microphone is selected as default by the desktop/OS (USB headset, standalone mic, etc.), without needing static ALSA hardware overrides.
  • Confirmed working both in Decky UI test recording and in-game via controller push-to-talk.

@thijsdaniels thijsdaniels changed the title fix(backend): discover user audio session runtime dir for PipeWire support Fix: Discover Audio Runtime for PipeWire Sep 27, 2026
@thijsdaniels thijsdaniels mentioned this pull request Sep 27, 2026
@silverfoxy
silverfoxy merged commit ff7e9a6 into silverfoxy:master Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants