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 ...

Members online