Virtual Audio Cable for Zoom

JustPaul

New Member
I'm feeling a little slow, I apologize but I also thank you for replying such a detailed explanation.

I don't know where any of those codes go or how to do them " "virtual sinks" and such.
Any way to get a dumbed down version of what you explained?
I am needing to figure this out on MAC os Big Sur
I guess what I need to know is What apps do I need - What needs to run and how do I need to set it up?
I apologize profusely as I didn't see where I was located "

"

My bad I'll try and find my solution in the proper area
 

frisco

New Member
I'm feeling a little slow, I apologize but I also thank you for replying such a detailed explanation.

I don't know where any of those codes go or how to do them " "virtual sinks" and such.
Any way to get a dumbed down version of what you explained?
I am needing to figure this out on MAC os Big Sur
I guess what I need to know is What apps do I need - What needs to run and how do I need to set it up?

Sorry was your question about MacOS? This is in the linux forum, so I was assuming you were running linux. Most of what I said only applies to linux and to pulseaudio (which is used by default in many linux distros).

As for where to put the stuff, the file is in home directory, and called .config/pulse/default.pa. That said, what I included was a snippet, not the whole file. So if you are just creating the file, you will need to do one of two things above the code that I gave you. Either insert the line:

Code:
.include /etc/pulse/default.pa

Or just copy /etc/pulse/default.pa to ~/.config/pulse/ and edit the file to append the directives that I suggested.

Then after updating the file, run pulseaudio -k to kill pulse and restart it. You may want to run pavucontrol to keep track of all your sources and sinks.
 

closedwontfix

New Member
frisco's suggestions worked really well for me, so I wrote a script partially inspired by his post.

Suggestions for improvement welcome.




Here is how I accomplish this using pulseaudio. Basically what we need to do is create 2 new sinks and one new source. I'm going to name them as follows:
  • to_obs will be a new sink that goes to OBS and is recorded in OBS, but where the sound is not sent upstream. This will be used for audio from your videoconference, which you don't want to send back upstream. It will also go to your speakers.
  • to_obsmon will go to OBS to be recorded and sent back upstream. You would use this, for example, if you were were playing a video for people in your zoom chat, and want the audio both recorded and sent upstream.
  • from_obs will be a source for sound coming out of OBS.
The complication here is that the only way to get sound out of OBS is through the monitor device, and there is only one. So while in an ideal world you would have two audio output streams from OBS, send one to zoom and both to your speakers, we are going to have to approach this differently. Instead, we'll have pulseaudio direct both to_obs and to_obsmon to your speakers, and will send the audio output of OBS just to zoom, not to any real devices.

So then this is what you need to put in ~/.config/pulse/default.pa. Note that to test this out, you can paste these into pacmd if you want to test things out. Also a reminder that to kill pulseaudio, you can run pulseaudio -k, and then it will re-read your new default.pa when it restarts (which may be automatic for many configurations). In my example, my real microphone is called nt5 and my speakers are called something complicated, so I'll just call them speakers here for simplicity. You'll have to edit accordingly.

Code:
load-module module-virtual-sink master=speakers use_volume_sharing=no sink_name=to_obs sink_properties=device.description=To_OBS

load-module module-virtual-sink master=speakers use_volume_sharing=no sink_name=to_obsmon sink_properties=device.description="To_OBS\ (Monitored)"

load-module module-null-sink sink_name=from_obs sink_properties=device.description="OBS\ monitor\ sink"
load-module module-virtual-source source_name=from_obs master=from_obs.monitor source_properties=device.description=From_OBS

load-module module-echo-cancel aec_method=webrtc source_name=aec_mic source_master=nt5 sink_name=to_obsaec sink_master=to_obs use_master_format="true" aec_args="analog_gain_control=0\ digital_gain_control=1"

Okay, let me break down what is going on here. In the first two lines, we create "virtual sinks." A virtual sink is a sink that just passes audio along to another sink. Why is it useful? Because each sink has its own monitor. So anything you play to to_obs or to_obsmon will just come out of your speakers (because of maseter=speakers, which you will have to replace with the real name of your speakers from the output of pactl list short sinks). But, it will be possible for OBS to distinguish what you've sent to to_obs from what you've sent to to_obsmon.

Next, we create a third sink called from_obs. This is a null sink, meaning pulseaudio will just discard the audio played to that sink. Again, the reason this is useful is that the null sink has a monitor source. Hence, even though the audio will not go to any real audio device, we want zoom to send the from_obs.monitor audio back upstream. The slight problem is that zoom will not give you an option to use a monitor source, because zoom thinks you want to use a real microphone, which should look like a hardware audio device. So this time we solve the problem using a virtual source, which, you guessed it, just copies data from some other source. We create a source called from_obs that just copies audio from the monitor of the from_obs sink, called from_obs.monitor. (Yes, there is both a source and a sink called from_obs.) Zoom will happily let you select the virtual from_obs source even while it hides from_obs.monitor.

Now you have to configure OBS. Under Settings -> Audio, you should configure two desktop audio devices. The primary one will be "To_OBS", and the second one will be "To_OBS (Monitored)" (which are the descriptions of to_obs and to_obsmon respectively). Also in the Audio settings, under Advanced set the monitoring device to "Monitor of OBS monitor sink." Next, in the audio mixer panel, click the gear for any audio source and go to "Advanced Audio Properties". Make sure that "Desktop audio" is set to "Monitor Off," while "Desktop Audio 2" is set to "Monitor and Output." Finally, on your microphone source, you will probably want to click filters and add a Noise Suppression filter (RNNoise). I also add a compressor to mine. Then in the Zoom Audio settings, set "Suppress background noise" to "Low," because now OBS is doing your noise suppression.

So in my experience what I've described so far is good enough to work with zoom, but isn't quite good enough for webrtc-based conferencing systems like google meet. In these systems, people complain that they hear themselves echo, presumably because OBS is inserting delay that messes with the browser's echo cancellation. So if you have that problem, you will need one more trick, which is to do the echo cancellation inside pulseaudio. That's the purpose of the final line in the default.pa snippet above. The way echo cancellation works in pulseaudio is that you have to feed audio through in both directions--it's essentially a virtual source and a virtual sink in one.

Hence, to make use of echo cancellation you need to do two things. First, instead of sending your zoom audio to "To_OBS", you'll want to sent it to "To_OBS (echo cancelled with NT5)" (recall that NT5 is the name of my microphone--it will be something else for you). Second, instead of selecting NT5 as your microphone, you will want to select "NT5 (echo cancelled with To_OBS)". With this, there is only one tiny problem left. Sending your zoom audio to the echo-cancel sink "To_OBS (echo cancelled with NT5)" has no disadvantages--you can just do that all the time. However, there will be a slight degradation in audio quality if you use an echo cancelled microphone. So what you really want to do is send the echo cancelled microphone upstream, while recording your real microphone in OBS.

To record your raw microphone while sending echo-cancelled audio upstream, you need to go into OBS Settings -> Audio and select two microphone devices. For the main mic, choose the echo cancelled source. For Mic/Auxiliary Audio 2, select your raw mic device. Now once again to to Advanced Audio Properties and click "Monitor and Output" (or "Monitor only") for the main Mic (which is echo cancelled). Deselect all the track recordings so you don't record this. Then for Mic/Aux 2 (the non-echo cancelled one), make sure it is set to "Monitor Off" and that recording is selected.
 

ahmadanc

New Member
Your answer lies right there in your subject line :)


Install Virtual Audio Cable, set that as your monitor in OBS, set your sources in OBS to 'monitor and output', and set virtual audio cable as your mic in Zoom.

Use the OBS Virtual Cam to send your video.

You should be good to go!
Please Help :).
On video side, it works ok.
On Audio side I always get an echo or lag from the microphone.
These are my setting :
** Windows 10 Setting **
-- Sound.playback-- Cable Input VB Audio (set as default)
-- Sound.recording-- Cable Output VB Audio (set as default)
-- Sound.recording.CableOutput.Properties.Listen.ListenToThisDevice--Speakers(ConexantSmartAudio)

** Zoom Setting **
Speaker. CABLE Input(VB-Audio Virtual Cable)
Microphone. CABLE Output(VB- Audio Virtual Cable)

** OBS setting: **
Sources: Media Source
MicH4N
Setting.Audio.Global Audio Devices... all disabled
Setiing. Audio.Advanced.MonitoringDevice.Cable Input (VB-Audio Virtual Cable)

** Result 1 **
Advance Audio Properties (option 1)
Media Source.Audio Monitoring-- Monitor and Output
Media Source.Audio Monitoring-- Monitor and Output

Audio Mixer displays (presumably correct) audio signals from Media Source and MicH4N
Heard on headphone
-- lag or echo from the microphone source.
-- Media source MP4 file, looks and sound great.
Zoom. Test Mic
-- lag or echo from the microphone source.
-- Media source MP4 file, looks and sound great.

** Result 2 **
Advance Audio Properties (option 2)
Media Source.Audio Monitoring-- Monitor off
Media Source.Audio Monitoring-- Monitor off
Result : Audio Mixer displays (presumably correct) audio signals from Media Source and MicH4N
Heard on headphone: no sound
Zoom Test Mic : no sound

What do I Miss..
Thanks a lot..
 

CodingAlbert

New Member
Your answer lies right there in your subject line :)


Install Virtual Audio Cable, set that as your monitor in OBS, set your sources in OBS to 'monitor and output', and set virtual audio cable as your mic in Zoom.

Use the OBS Virtual Cam to send your video.

You should be good to go!
This doesn't work for me as I then hear the monitor of both of my sources during my Video Call. Unfortuntely, It isn't possible to add VB-Cable as a Audio Recording Output in OBS. If it were, the problem would be solved.

Does anyone have a new insight on this?
 

aracloud

New Member
Hi all,

Many thx first for all your replies and I want to give something back to this community from my side.

I'm not an audio expert but I started to use "Jack" on top of PulseAudio. So, as far as I understand PulseAudio delivers now IN and OUT of audio to "jack".
(pulseaudio-module-jack - jackd modules for PulseAudio sound server)

(BTW: I'm using here Linux Mint and all the packes are available natively within APT)

Jack explanation: https://jackaudio.org/

additional packaes I installed (german explanation https://wiki.ubuntuusers.de/JACK/Grafische_Konfiguration/):
- pulseaudio-module-jack
- jackd
- jack-rack
- qjackctl
- catia / claudia (claudia is an awsome software based audio connection manager explained here https://kx.studio/Documentation:Manual:simple_claudia_studio)
- kxstudio-repos (wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb)

Mine looks like that for example:

1619163324015.png


And the MIC and Audio output is everywhere available... Teams, Zoom end even in Webbrowsers Audio settings.

So, if you need to tune the voice in some ways... jack-rack is your friend and if started it would show up like this in "claudia":

1619163661354.png


which now can be used to plug-in between "Blue MIC" and "JACK Source" to change your voice in many serious ways but also in funny ways ;-).

Have fun
 

DrInterpreter

New Member
I have a problem with the solution. As part of a presentation, I need to have my headset as a monitor, so I can interact convincingly with a video I am playing on split screen while also sending the overall audio to Zoom. Is this possible? I am using Windows 10.
 

naved_da_sheikh

New Member
Your answer lies right there in your subject line :)


Install Virtual Audio Cable, set that as your monitor in OBS, set your sources in OBS to 'monitor and output', and set virtual audio cable as your mic in Zoom.

Use the OBS Virtual Cam to send your video.

You should be good to go!


Can we also use Audio Plugins with this to broadcast our audio with sound effects like reverb and delay etc. on Zoom Meetings??
 

nekobaby

New Member
Belated, but for anyone who it might be relevant to . . .
I just found the Audio Monitor plugin at https://obsproject.com/forum/resources/audio-monitor.1186/
If you add an audio input/output into a scene, you can then add a filter to it called Audio Monitor, which then allows you to output that source to another device.

I have a Rodecaster Pro and needed to be able to split my tracks because my console is running through TRSS and I only have one microphone. I'm using an ASIO plugin to separate the tracks, but if I was in Discord (or any other voice chat software) and playing a game, they could hear my game audio as well. Big problem. With the plugin, I can add the Audio Monitor as a filter to my mic and then output ONLY that specific track to a virtual cable. Then that virtual cable is what I use in the other programs like Discord, Zoom, etc.

Now, if background noise or such is an issue, you could forward that cable to a program like Nvidia Broadcast instead. And then have Nvidia Broadcast be your input in other software. This is basically what I'm doing (there's a tv in the next room and a fan to contend with) and it is working wonderfully. I even added Nvidia Broadcast back into OBS as my mic. And I can mute & hide the track that is the outputted audio source in OBS and it still works for me. Let's me keep my mixer uncluttered.
 

eXorQ

New Member
I found a solution. You need to download two things
- NDI Integration for OBS: https://obsproject.com/forum/resources/obs-ndi-newtek-ndi™-integration-into-obs-studio.528/
- NDI Tools, specifically the one with NDI VIrtual Input (when you're on MacOS) (https://gist.github.com/derhuerst/83653c13d94e03723a4f6d27ad6e716a)

First you need to send the output to NDI
1. start obs
2. Tools > NDI Output Settings
3. Enable Main Output. Fill in any name you want, this will be visible when you select it in the NDI tool

From NDI you want to create a Virtual Input (for use in a Zoom, Jitsi, whatever session)
4. open NDI Virtual Input (app on MacOS)
5. in the status bar there will be a "NDI" thingy, click on it and select the name you filled in in step 3

Open Jitsi or any other tool
6. Select as microphone, the NDI Audio (Virtual)

Now you'll have your Audio Output from the stream next to the Virtual Camera of OBS. Delays, Filters, anything you add in OBS will be present in this NDI Audio (Virtual) device
 
Top