Pipewire - Send Audio Over the Network

Super simplified article on how to receive microphone audio over the network.

Receiver Host

Creating the audio server.

pactl load-module module-native-protocol-tcp port=8888 listen=192.168.200.2
Start the server.
pactl load-module module-zeroconf-publish
Publish the configuration to the network.

Not sure if the zeroconf makes a difference when the clients are from different networks.

Sender Host

Connect to the remote server.

PULSE_SERVER=tcp:192.168.200.2:8888 pactl info
Connecting to the remote server.
pactl load-module module-tunnel-sink server=tcp:192.168.200.2:8888
Create a sink to send audio.

With the sink created we need to connect the capture devices. Since I am doing the connection over the network. Let's use the pipewire CLI tool set. If you have graphical access to the receiver it is possible to use qpwgraph to easily connect the sink.

pw-link -iI
  40 Midi-Bridge:Midi Through:(playback_0) Midi Through Port-0
  44 alsa_output.pci-0000_01_00.1.hdmi-stereo:playback_FL
  52 alsa_output.pci-0000_01_00.1.hdmi-stereo:playback_FR
  34 alsa_output.pci-0000_00_1f.3.analog-stereo:playback_FL
  45 alsa_output.pci-0000_00_1f.3.analog-stereo:playback_FR
  57 tunnel-sink.tcp:192.168.200.2:8888:playback_FL
  58 tunnel-sink.tcp:192.168.200.2:8888:playback_FR
List of Pipewire outputs.
pw-link -oI
  54 alsa_input.pci-0000_00_1f.3.analog-stereo:capture_FL
  55 alsa_input.pci-0000_00_1f.3.analog-stereo:capture_FR
List of Pipewire inputs.

Connecting the microphone to the remote output.

pw-link 55 58
pw-link 54 57

The audio should be flowing to the remote PulseAudio Server.

Removing the Connection

To remove the sink from the client side.

pactl unload-module module-tunnel-sink

To kill the server.

pactl unload-module module-native-protocol-tcp
pactl unload-module module-zeroconf-publish

Resources

PipeWire - ArchWiki

https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-PulseAudio#network-support

PipeWire: pw-link
System configuration [Linux-Sound]