From 99157b9a8a982f1412417adb169bd5f92393be22 Mon Sep 17 00:00:00 2001 From: imonlinux <39863321+imonlinux@users.noreply.github.com> Date: Tue, 16 Dec 2025 09:44:52 -0800 Subject: [PATCH] Add AEC persistance service file --- service/aec-module-load.service | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 service/aec-module-load.service diff --git a/service/aec-module-load.service b/service/aec-module-load.service new file mode 100644 index 0000000..60d9838 --- /dev/null +++ b/service/aec-module-load.service @@ -0,0 +1,21 @@ +[Unit] +Description=Load PipeWire echo-cancel module for LVA +After=pipewire-pulse.service +Wants=pipewire-pulse.service + +[Service] +Type=oneshot +RemainAfterExit=yes + +# Use a shell so we can do a little logic: +# 1) Try to unload any existing echo-cancel module (ignore errors) +# 2) Load the WebRTC echo cancel module with our tuning options +ExecStart=/usr/bin/bash -lc '\ + pactl unload-module module-echo-cancel || true; \ + pactl load-module module-echo-cancel \ + aec_method=webrtc \ + aec_args="analog_gain_control=0 digital_gain_control=1 voice_detection=1" \ +' + +[Install] +WantedBy=default.target