mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-16 05:10:42 -07:00
cpal 0.15 uses ALSA as its Linux backend, which does not expose PulseAudio/PipeWire monitor sources. The previous approach searched for 'monitor' in cpal device names, which never matched on most Linux systems, silently falling back to the microphone input. This fix: - Detects the correct monitor source via 'pactl get-default-sink' and 'pactl list short sources' - Sets PULSE_SOURCE env var before cpal initialization so PulseAudio's ALSA plugin routes the default input through the monitor - Preserves the original name-based search as fallback when pactl is unavailable - No new dependencies added Tested on PipeWire 1.0.5 with Realtek ALC897 (HD-Audio Generic).