Skip to content

Instantly share code, notes, and snippets.

@rehhouari
Created March 15, 2024 01:16
Show Gist options
  • Save rehhouari/60b01dc88f1fc520b926ed23f67386c9 to your computer and use it in GitHub Desktop.
Save rehhouari/60b01dc88f1fc520b926ed23f67386c9 to your computer and use it in GitHub Desktop.
How to install AudioRelay on Linux using Pipewire (through pipewire-pulse)

Setup AudioRelay on Pipewire

Official guide for PulseAudio: https://docs.audiorelay.net/instructions/linux/use-your-phone-as-a-mic-for-a-linux-pc

Download AudioRelay

From: https://audiorelay.net/downloads/linux

Deb on debian or ubuntu, archive for others.

Install pipewire-pulse

On arch you run:

sudo pacman -S pipewire-pulse

Debian based: apt install pipewire-pulse

Create a config file for virtual mic device

mkdir -p ~/.config/pipewire/pipewire-pulse.conf.d
nano ~/.config/pipewire/pipewire-pulse.conf.d/audiorelay.conf

Note you can also go to ~/.config/pipewire/pipewire-pulse.conf.d and edit audiorelay.conf with a graphical text editor

Add the following:

pulse.cmd = [
    { cmd = "load-module" args = "module-null-sink sink_name=audiorelay-virtual-mic-sink sink_properties=device.description=Virtual-Mic-Sink" flags = [ ] },
    { cmd = "load-module" args = "module-remap-source master=audiorelay-virtual-mic-sink.monitor source_name=audiorelay-virtual-mic-sink source_properties=device.description=Virtual-Mic" flags = [ ] }
]

These are the same commands from the official guide but adjusted for pipewire-pulse, you can check for yourself in the first link.

Save the file and exit.

restart pipewire-pulse

This is needed to load the virtual device

systemctl --user restart pipewire-pulse

List pipewire/pulseaudio modules to see if it's there

pactl list modules short

Now just launch Audiorelay, select the newly created Audio Device in the dropdown to the left. Then select the same device in your sound settings as the input device to use it as a mic. you can use a website or discord to test if it's working. (See official pulseaudio guide for screenshots)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment