system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does noise cancellation software work?

Hi, you have noise cancellation apps on laptops like Krisp. I'm curious about how they work. I know about Active Noise Cancellation on headphones and how it works, but could the same be achieved by this software. And how does the app know which part of the sound wave is noise and which is useful audio?
gpt
So there are microphones on the outside listening to what's around you. Sound waves behave like other waves, if two of equal and opposite size meet, they interfere with each other and cancel each other down to zero. So the software listens to the environment around you, makes a waveform of the sound, and plays it's inverse with the music you're listening to. The inverse waveform "destroys" the waveform of the sounds getting to your ear through the headphones.