← Whispering

fix: Allow monitor devices from PulseAudio/PipeWire host APIs

768608411c4d3c3f44194c7a25ef0fb117fb5575 · Claude · Jan 25, 2026 23:32

Previously only ALSA devices were accepted for monitors, but PulseAudio/PipeWire
monitor devices may appear under different host APIs. Now we accept monitors
from any host API except JACK (which causes crashes).

+7 −2 · 1 file changed

  • src/core_parts/audio_devices.py +7 −2
diff --git a/src/core_parts/audio_devices.py b/src/core_parts/audio_devices.py
index e11a095..43d0ea8 100644
--- a/src/core_parts/audio_devices.py
+++ b/src/core_parts/audio_devices.py
@@ -64,6 +64,9 @@ def get_monitor_names():
 
     Monitor devices capture what's being played through speakers/headphones.
     On PulseAudio/PipeWire, these typically have 'Monitor' in the name.
+
+    Unlike regular mics, we accept monitors from any host API except JACK,
+    since PulseAudio/PipeWire monitors may not appear under ALSA.
     """
     devices_list = sd.query_devices()
 
@@ -72,10 +75,12 @@ def get_monitor_names():
     for i, d in enumerate(devices_list):
         if d['max_input_channels'] > 0:
             name_lower = d['name'].lower()
-            # Only ALSA devices (JACK crashes)
             api_name = sd.query_hostapis(d['hostapi'])['name'].lower()
-            if 'alsa' not in api_name:
+
+            # Skip JACK (causes crashes)
+            if 'jack' in api_name:
                 continue
+
             # Look for monitor devices (PulseAudio/PipeWire convention)
             if 'monitor' in name_lower:
                 monitors.append((i, d['name']))