Scripts to create and manage virtual audio paths using pactl on Linux.
Software with similar functionality exists for Windows and macOS.
Each pipeline consists of:
<label> playback sink<label> recording source (from that sink’s monitor)The script creates device names with the virt_ prefix.
Each pair is isolated from physical speakers/microphones because audio stays in a null sink + monitor source path.
pactl./virtual-mic.sh -n <count> [-l <label>]...
./virtual-mic.sh status
./virtual-mic.sh off
./virtual-mic.sh -h
./virtual-mic.sh --help
-n <count>: Number of virtual pipeline pairs to create.-l <label>: Label for a pipeline. Can be repeated.status: Show all virt_ sinks, sources, and matching modules.off: Remove all virtual devices/modules that reference virt_.-h, --help: Show help text.Provided -l values are used first in order. If fewer labels are provided than -n, the script auto-generates names as v1, v2, v3, and so on.
Example:
./virtual-mic.sh -n 4 -l wombat -l wombat2
Creates labels in this order:
wombatwombat2v1v2Create 2 pipelines with auto labels:
./virtual-mic.sh -n 2
Create 3 pipelines with one custom label:
./virtual-mic.sh -n 3 -l podcast
Check status:
./virtual-mic.sh status
Remove all created virtual devices:
./virtual-mic.sh off
virtual-mic-mux.sh combines audio streams (for example, mic + app audio) into a single virtual mic path.
Show its built-in help:
./virtual-mic-mux.sh -h
Current usage from the script:
./virtual-mic-mux.sh on
./virtual-mic-mux.sh off
./virtual-mic-mux.sh status
Command summary:
on: Create and enable the muxed virtual mic path.off: Tear it down and restore previous defaults.status: Show current mux status.