Remove sound based on profile in other file

Audacity 2.2.1
Ubuntu 18.04

I have a recording from a PC mic and want to remove sound that came from the PC speaker, at the same time that recorded the mic I recorded the speaker output so have an exact profile I want to remove, can this be done? if yes how.
Disclaimer, I have only ever used Audacity to remove parts of a audio file and do not have much experience with it.

Man thanks for your help

If you want to try, open the show with the bad sound in Audacity and then open the correction sound. They should arrive one under the other. You can use the SOLO and MUTE buttons to make sure you know what you have. If you don’t do anything, they will both play at once.

Select the correction sound and Effect > Invert.

Then listen to both and use Effect > Amplify and the Time Shift Tool (two sideways black arrows) to shift the correction sound louder and quieter, and sooner and later until it cancels. This may not be a five minute job. Cancellation isn’t easy.


Sometimes it’s handy to use Magnification as you get closer and closer. I use three tools out of the pile available. You may like others.

Drag-select some part of the show and Zoom into it with Control+E. Zoom Out a little bit with Control+3 and Zoom out Full with Control+F. Shift+Scroll Wheel will let you scoot left and right to see what you want.

This is the idea when you get everything working. Those two waves will cancel.

Screen Shot 2021-01-06 at 9.12.49 AM.png

I’m not sure exactly what you mean, but my initial impression is that it is probably not possible.

The part that confuses me is that you say that you recorded the sound from the PC speaker at the same time that you recorded the mic. How exactly did you do that?

Sometimes this works a little better if you’re on headphones. As you get close, the show will start to sound “deep” and weird. That’s a sign of partial cancellation. You’re close.


Not sure what confuses you, I ran 1 command to record the mic and another to record lineout so I have a recording of the mic and another of the lineout

The thing that confuses me is: “at the same time”.
It confuses me because Audacity cannot record two different things at the same time, unless perhaps you are using two computers, or virtual machines, or similar.

I did not use Audacity to record the audio, i recorded using arecord and parecord.

Thanks, that clears my confusion, though it does not explain why you didn’t record the mic alone, since that is what you want :confused:

As Koz wrote, you may be able to achieve some amount of reduction of the PC speaker using the “invert and mix” technique, though it is unlikely that you will be able to remove the PC speaker sound entirely.

Thanks all, seems like its bigger than I can bite given I have no experience with audio manipulation. unfortunately I’m gonna have to give it a pass.