Skip to content

Commit b801e13

Browse files
committed
fix(ci): keep av.libs/libasound for PyAV, only remove _internal/libasound
Bundled libasound has its ALSA plugin search path hardcoded to the build host's path (Ubuntu CI: /usr/lib/x86_64-linux-gnu/alsa-lib). On other distros (Arch: /usr/lib/alsa-lib) this path doesn't exist, so libasound can't load libasound_module_pcm_pipewire.so / pulse plugin and PortAudio silently reports zero virtual input devices — the recurring 'no mics in build' bug. Removing _internal/libasound* makes the loader fall through to the user's system libasound, which knows its own plugin layout. Do NOT delete av.libs/libasound-cfbebb71.so.2.0.0 — PyAV's libavdevice has that exact name in its NEEDED list (different SONAME, doesn't conflict with PortAudio's libasound.so.2 lookup). Removing it crashes startup with ImportError on libasound-cfbebb71.
1 parent ed87b87 commit b801e13

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,25 @@ jobs:
7777
- name: Build application
7878
run: pnpm run build
7979

80-
- name: Remove bundled PortAudio
80+
- name: Remove bundled PortAudio and ALSA
8181
run: |
82-
# Remove bundled PortAudio so the app uses the system's libportaudio
83-
# which has PipeWire/PulseAudio backends. Ubuntu's PortAudio only has ALSA.
82+
# Use the system's libportaudio (the Ubuntu-bundled copy is ALSA-only
83+
# with no PipeWire/PulseAudio backend, so virtual devices are missing).
8484
rm -f ./dist/VoiceFlow/_internal/libportaudio*
85-
echo "Removed bundled PortAudio (will use system library at runtime)"
85+
# Use the system's libasound. The bundled copy has its ALSA plugin
86+
# search path hardcoded at build time to the build host's layout
87+
# (e.g. /usr/lib/x86_64-linux-gnu/alsa-lib on Ubuntu). On distros
88+
# with a different layout (Arch: /usr/lib/alsa-lib) libasound can't
89+
# find libasound_module_pcm_pipewire.so / pulse plugin, and PortAudio
90+
# silently reports zero PipeWire/Pulse-routed input devices.
91+
# Removing _internal/libasound* makes the dynamic linker fall through
92+
# to the user's system libasound, which knows where its own plugins live.
93+
# Do NOT delete av.libs/libasound-cfbebb71.so.2.0.0 — PyAV's libavdevice
94+
# has that exact filename in its NEEDED list (different SONAME from
95+
# libasound.so.2, so it doesn't conflict with the PortAudio side).
96+
# Removing it crashes startup with ImportError on libasound-cfbebb71.
97+
rm -f ./dist/VoiceFlow/_internal/libasound*
98+
echo "Removed bundled PortAudio + ALSA (will use system libraries at runtime)"
8699
87100
- name: Clear executable stack flags
88101
run: |

0 commit comments

Comments
 (0)