QEMU's JACK backend provides the best audio quality out of all the available options (Scream, PulseAudio, etc.). One of the easiest ways to leverage the JACK support is by using PipeWire, which emulates JACK.
First, you must make sure your distro's QEMU is built with JACK support:
* On Debian, this is not the case until QEMU 6.1. This is currently only in unstable. In the meantime, you can use [https://apt.quantum2.xyz/qemu-jack/ this repository].
Normally, you can run applications with PipeWire's JACK support by running it with <code>pw-jack</code>, but this is not possible when using libvirt. Instead, you need PipeWire to provide drop-in JACK support. To do this: