passing sound around via command line


New Member
I would like to take sound outputs FROM Firefox and pass just Firefox sound to SOX to process the audio with noise reduction then pass the post-processed sound back to my speakers to enjoy. I have various bits a pieces working but just cant quite bolt it all together. i can get SOX to do noise reduction of sound files, i can get the firefox audio to record to a sound file using my recording sink and i can play back the sound file... but i want to pass these three things along in one chain with no files.

1. i made a virtual sync and loopback called recording.monitor and it works

pacmd load-module module-null-sink sink_name=recording sink_properties=device.description=recording
pacmd load-module module-combine-sink sink_name=combined sink_properties=device.description=combined slaves=recording,alsa_output.pci-0000_00_1b.0.analog-stereo

2. Ive cobbled this line together but it doesn't work

pacat --record -d recording.monitor | sox -t raw noisered profile 0.0001 | play -

i dont want files to be involved. just take an audio stream from firefox, apply noise reduction to it with sox and play it back in real time. Sox seems to have a nice noise reduction capability, however i have explored ffmpeg with no success.

thanks so much ...


New Member
This lets me hear both Linux and Windows at the same time with zero latency, uses the mixer's preamp for the mic and I can monitor the mic in my headphones. Right now there's no microphone input to the Windows VM which is how I want it, but the example in the blog post works with microphone to both guest and host.
Last edited:

Members online