simplified my pipewire conf

This commit is contained in:
2026-02-15 00:54:45 +01:00
parent 885fbc1551
commit 4e2e75a044
26 changed files with 823 additions and 314 deletions

View File

@@ -0,0 +1,72 @@
context.modules = [
{ name = libpipewire-module-echo-cancel
args = {
# Standard mode: Acts as a virtual sink/source pair
monitor.mode = false
library.name = aec/libspa-aec-webrtc
node.description = "Voice Engine (AEC)"
# 1. The Virtual Sink (Reference)
# Route your Game/Desktop audio here so it gets cancelled from the mic.
# It will automatically pass through to your default speakers.
sink.props = {
node.name = "voice_engine_reference"
node.description = "Voice Engine Reference (Sink)"
}
# 2. The Processed Source (Mic)
# This is the output of the echo canceller. We feed this into RNNoise below.
source.props = {
node.name = "voice_engine_aec_source"
node.description = "Voice Engine AEC Output"
}
aec.args = {
# CRITICAL: Fixes robotic audio by handling clock drift between USB devices
webrtc.drift_compensation_enabled = true
# We use RNNoise separately for better quality, so disable this
webrtc.noise_suppression = false
webrtc.voice_detection = true
webrtc.extended_filter = true
}
}
},
{ name = libpipewire-module-filter-chain
args = {
node.description = "Voice Engine (Final)"
media.name = "Voice Engine (Final)"
filter.graph = {
nodes = [
{
type = ladspa
name = rnnoise
plugin = "/usr/lib/ladspa/librnnoise_ladspa.so"
label = noise_suppressor_mono
control = {
"VAD Threshold (%)" = 50.0
"VAD Grace Period (ms)" = 200
"Retroactive VAD Grace (ms)" = 20
}
}
]
}
# Automatically grabs the output from the AEC module above
capture.props = {
node.name = "voice_engine_rnnoise_in"
node.passive = true
"target.object" = "voice_engine_aec_source"
}
# This is the FINAL device you select in Discord/Zoom/etc.
playback.props = {
node.name = "voice_engine_final"
node.description = "Voice Engine (Final)"
media.class = "Audio/Source"
}
}
}
]

View File

@@ -1,39 +0,0 @@
context.modules = [
{
name = libpipewire-module-echo-cancel
args = {
library.name = aec/libspa-aec-webrtc
monitor.mode = true
capture.props = {
node.name = "EC Capture"
node.passive = true
"target.object" = "{{ .chezmoi.config.data.microphone }}"
}
source.props = {
node.name = "source_ec"
node.description = "Echo-cancelled microphone"
node.autoconnect = false
audio.channels = 1
audio.position = [ MONO ]
}
sink.props = {
node.name = "sink_ec"
node.description = "Echo cancellation reference"
}
playback.props = {
node.name = "EC Playback"
node.passive = true
}
aec.args = {
webrtc.extended_filter = false
webrtc.gain_control = false
webrtc.voice_detection = true
}
}
}
]

View File

@@ -1,45 +0,0 @@
context.modules = [
{
name = libpipewire-module-filter-chain
args = {
node.description = "Noise Canceling source"
media.name = "Noise Canceling source"
audio.channels = 1
audio.position = [ MONO ]
filter.graph = {
nodes = [
{
type = ladspa
name = rnnoise
plugin = /usr/lib/ladspa/librnnoise_ladspa.so
label = noise_suppressor_mono
control = {
"VAD Threshold (%)" = 80.0
"VAD Grace Period (ms)" = 200
"Retroactive VAD Grace (ms)" = 0
}
}
]
}
capture.props = {
node.name = "capture.rnnoise_source"
node.passive = true
audio.channels = 1
audio.position = [ MONO ]
audio.rate = 48000
"target.object" = "source_ec"
}
playback.props = {
node.name = "rnnoise_source"
media.class = "Audio/Source"
audio.channels = 1
audio.position = [ MONO ]
audio.rate = 48000
}
}
}
]