fix(linux): enable PulseAudio/PipeWire system audio capture#396
Closed
belisards wants to merge 3 commits intoZackriya-Solutions:devtestfrom
Closed
fix(linux): enable PulseAudio/PipeWire system audio capture#396belisards wants to merge 3 commits intoZackriya-Solutions:devtestfrom
belisards wants to merge 3 commits intoZackriya-Solutions:devtestfrom
Conversation
- Use pactl to enumerate monitor sources and expose them as system audio devices - Follow default sink via pactl get-default-sink (works with Bluetooth, USB, HDMI) - Set PULSE_SOURCE env var and capture via pulse ALSA device - Add default_system_audio_device() for Linux recording path - Stop CPAL from adding raw ALSA devices as spurious system audio options
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.
Fixes #383
Type of Change
Description
System audio capture was not implemented on Linux — the code explicitly bailed
out for non-macOS platforms, so only microphone audio was transcribed. Browser
meeting tools (Teams, Zoom, Meet in Chrome) were never captured.
On Linux, PulseAudio and PipeWire expose monitor sources for each output sink —
input devices that capture whatever plays through the corresponding output.
Changes:
pactl list sources shortto enumerate monitor sources and show themin the System Audio device selector
pactl get-default-sinkto auto-select the correct monitor regardlessof output type (Bluetooth, built-in, HDMI, USB)
PULSE_SOURCE=<monitor>and capture via the"pulse"ALSA device soCPAL handles it as a normal input stream
default_system_audio_device()for the Linux recording pathdiscovery.rsto stop CPAL from adding raw ALSA names (pulse,default,hw:*) as spurious system audio options in the UIPrerequisites
pulseaudio-alsaorpipewire-alsa(default on Ubuntu, Fedora, Debian desktop).Testing
Tested on
Documentation
Relation to PR #309
Implements the same core approach as #309 but as a focused, standalone fix
without the unrelated feature removals bundled in that PR.
Note
This fix was developed using Claude Code (claude-sonnet-4-6).