Dear VFIO friends, I have a big problem and that is noise. To make a long story short, the only noise reduction tool that works for me is RTX Voice. I have tried many others but they all fail in my noisy environment. But why am I sharing this with the VM folks? The reason is that only Windows 10 and an Nvidia RTX GPU can handle RTX Voide (Nvidia’s noise suppressor). I know you can get RTX Voice to work on other versions of Windows as well as GTX cards. But the main requirement remains: Nvidia GPU and Windows.
So all I have to do is plug my USB sound interface into the Windows VM with Nvidia GPU passthrough and install RTX Voice. I tested this and it works fine. The problem I have with this is that I don’t want to record myself with OBS inside the Windows VM, I want to stream from my much more trusted Linux desktop system. This would also allow me to keep the Windows VM offline to ensure that my audio remains private.
I am aware of the OBS plugin for Looking Glass that can read directly from the shared memory device. I would need something similar for my audio coming from the Windows guest.
Is there a way to do this with LookingGlass? Please help me out.
After scratching my head about what I want to do, I need to ask follow-up questions. I would like to know if Looking Glass has any kind of feature that would best answer my original question.
However, I suppose I could also use a PCIe sound card and route the audio in a physical loop between the host and the VM.
I could connect my desktop audio output to my VM PCIe sound card input, use the RTX Voice filters, and play it through my headphones (also connected to the VM). My microphone is also connected to the VM via USB, uses the RTX Voice filter, and goes back to my host as an input signal (VM PCIe sound card out signal). It took me a while to figure this out, but it should work very similar to the Laure.nz blog post I found: Nvidia RTX Voice - On Linux - blog.laure.nz
To make the setup work, I have a few questions:
Are there any specific sound card requirements for PCIe passthrough? What model would you recommend? Or is there a much simpler and similarly high-quality, low-latency way to pass audio between host and guest? Please tell me if there is some Looking Glass feature I am not aware of that would make my follow-up questions irrelevant.
Would it be smarter (for the reason you tell me) to use a PCIe USB card (instead of PCIe sound card) that I run through my USB microphone and USB sound card?
Continuing this monologue, I found out that according to the LG wiki, there is also Scream and JACK/PipeWire audio passthrough. Here is the link: Guides - Looking Glass
My questions about this:
Am I correct in understanding that JACK/PipeWire is the best option for low latency audio passthrough when the LG client is not running?
Is JACK/PipeWire lower latency/better audio quality than physically looping an AUX cable through a PCIe sound card?
Is JACK/PipeWire a good solution for my RTX Voice setup?
I am not familiar with RTX Voice, but here are a few points:
To get audio working in a VM you either use a passthrough sound device or you use QEMU emulated sound driver to “escape” the VM audio into the host.
QEMU emulated audio is inferior in quality to a native, passed-through hardware
QEMU emulated audio is presenting itself to the VM as a standard Windows audio source/sink so if RTX voice can route audio to such a device, you can get audio working. If not, you can search for numerous Windows audio routing software products that can help you with this. The back-end (Linux side) of the QEMU emulated audio driver can be used by a variety of modules. If you use LG, then you can use LG’s native audio support that uses the SPICE back-end which will bring Windows audio directly to your Linux host’s PipeWire. See keyboard-mouse-display-audio for further details.
Thank you for your reply. It seems I need to be more specific about what I am trying to accomplish. My ultimate goal is to get clean, low latency, high quality audio output in my Linux host while the sound is coming from the Windows VM.
The sound goes like this: Microphone > USB passthrough to Windows 10 VM > NVIDIA Broadcast (this is my main reason for doing this, to filter out noise) > WIP HOW CAN I GET IT “BACK” TO THE HOST (it was never in the host, as the microphone originates as a USB passthrough in the VM).
Windows 10 has a sound “listen” feature that can listen to one device and output to another. Linux speaks: I can pipe sound from the NVIDIA microphone to XYZ other sound device.
Which I already did: I piped the NVIDIA microphone back to the Windows speakers. Using Looking Glass B6, I could then listen to my audio on the Linux host. B6 integrates audio through the spice server. However: 1) I don’t want to keep the LG window open all the time, 2) the sound was super bad, dropping out in the middle, crackling, etc…
So I need some kind of high quality audio device to capture the sound and send it to the Windows host. I looked into the LG wiki and it says that JACK/PipeWire is the best solution for my usecase. However, I could not get it to work. Then I tried Scream and failed as well. Can anyone please help me set up Jack/PipeWire on Fedora or is it no longer supported?
The JACK/Pipewire backend is a QEMU feature, not LG, so there’s no “support” question here as it’s not related, and it will be available as long as QEMU supports that back-end. As I mentioned in my previous post, ANY solution that is based on the emulated QEMU driver is inferior. This means that if your priority is “low-latency, high-quality”, then this is not for you.
Thank you for your reply. So what do you recommend for the best and lowest latency audio quality? A physical audio interface that carries the audio back to the host?
Would a USB audio interface work the same as a PCIe sound card? What would be your preferred choice?
I also have an update on the PipeWire/Jack setup. What I have done so far:
Set up the Windows VM and NVIDIA Broadcast
Set my USB microphone inside the VM as an input for NVIDIA Broadcast
Set the Windows sound NVIDIA Broadcast output to “listen” to the Windows speaker (aka I pipe the NVIDIA Broadcast filtered sound to the main system speaker).
Set up Pipewire/Jack to get the sound back to the host (I struggled for a long time, but it seems for Fedora you need to install the “jack-audio-connection-kit” package.
Set up the Carla application to see my patchbays
Added a jack audio input for OBS
Connected my vm audio output with Carla to the OBS jack input
Now I can record my RTX voice filtered audio from my mic from the VM in my host within OBS. So basically I have exactly what I want. I still cannot hear myself with the mic in the host (only when recording), but that should be fixable with Jack and Carla.
The bigger problem I have now is that I have pretty good audio but sometimes some lag/stutter/cracking. It is really hard to describe.
What can I do to improve the audio?
My PIPEWIRE_LATENCY is currently set to 512. What is the best setting? What else can I do to improve the quality? In general, I think it is best if my system is not very CPU intensive. Is that really the case for better audio quality? Should I increase some process priorities?
Windows says I have 2 channel, 16bit, 48000 Hz (DVD quality) as the default output format for NVIDIA Broadcast. Do I need to do anything to match this with JACK/PipeWire/QEMU?
My Debian workstation runs a MacOS VM for audio creation and editing. Similar to you, I needed low latency, source quality audio passed through to my speakers, and recorded by my Linux host.
Linux supported an M-Audio Profire 610 box that I had previously used with my Mac Pro. It has a software defined crossbar router that can be controlled with FFADO Mixer. I configured it to simultaneously mix audio from the physical USB interface passed through to MacOS, and feed that audio to my Linux host.
I mix the L/R audio channels of Linux and MacOS and send this through to my speaker and headphone amplifier outputs. At the same time, all of these L/R mono inputs are visible to Linux through PulseAudio, and can be recorded like any other source, with Ardour, OBS, or even used with Discord. Each channel is individually addressable, so this would work identically for quadraphonic audio or a 5.1 setup as well.
This setup also allows my single microphone to be passed to the VM’s audio interface, and simultaneously used by Linux.
While I wouldn’t recommend going out of your way to add FireWire to your setup (I already had a FW card in my system), presumably a similar product exists with USB or Thunderbolt.