Canceling out external noise

Sony has some noise cancelling headphones, you can read about here:

Anyways, it requires batteries, and from what I’ve read, it seems like it has a microphone that picks up external noise, and cancels them out through the headphones. So… is there software to do this same thing, if you have a microphone and speakers, or something?