Querzion

VirtualCableSetup.sh

Dec 18th, 2021
1,352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.42 KB | None | 0 0
  1. #This is a script to load to virtual items in Linux
  2. # 1 a virtual microphone that can be used in Zoom / Jitsi etc
  3. # 2 A monitor device that can used to group different sources, like OBS
  4. # 3 A remap to route the monitor to the mic
  5. # 4 Finally a loop back audio device that can used to hear the stream.
  6. # note there is a delay, but if using OBS can fixed in the advanced audio properties.
  7. #To configure you should install 'PulseAudio Volume Control' (assuming you have pulseadio installed.
  8. # fedora "sudo dnf install pavucontrol"
  9. # Ubuntu or most apt based systems "sudo apt install pavucontrol"
  10. #!/bin/bash
  11.  
  12. pactl load-module module-null-sink sink_name=virtspk sink_properties=device.description=Virtual_Speaker
  13. pactl load-module module-null-sink sink_name=virtmic sink_properties=device.description=Virtual_Microphone_Sink
  14.  
  15. #Remap source
  16. #While the null sink automatically includes a "monitor" source, many programs know to exclude monitors when listing microphones. To work around that, the module-remap-source #module lets us clone that source to another one not labeled as being a monitor:
  17.  
  18. pactl load-module module-remap-source master=virtmic.monitor source_name=virtmic source_properties=device.description=Virtual_Microphone
  19.  
  20.  
  21. #Add loopback to hear
  22.  
  23. pactl load-module module-loopback latency_msec=1
  24.  
  25. #configure loop back in pulseaudio manager. This will be needed to do each time sorry. (Once you setup it should remember)
Advertisement
Add Comment
Please, Sign In to add comment