Let’s Start with some definitions:
Server: The computer that receives the audio and have the speakers connected.
Client: The computer that generates the audio and send it via the network.
On the server side you’ll need to enable the ‘module-native-protocol-tcp’ pulse-audio module, this module usually is already installed by but for security reasons it comes as disabled by default.
You’ll also need to open port tcp/4713 on your firewall.
After that you need to copy the file ‘~/.pulse-cookie’ from the server to every client.
Now that you synced the pulse-cookie file choose your authentication method used by the ‘module-native-protocol-tcp’ and edit the file ‘/etc/pulse/default.pa’.
If you want to let anyone with the right pulse-cookie file to connect and send audio:
load-module module-native-protocol-tcp auth-anonymous=1
Or a more secure approach is authentication with pulse-cookie and IP address or Network, if you have multiple clientes you just need to input a list separated by a semicolon:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;<CLIENT_IP_OR_CLIENT_NETWORK>