Active Noise Cancellation through default iPhone headphone

Ashok picture Ashok · Jul 18, 2013 · Viewed 21k times · Source

We want to create an App that will implement the Active Noise Cancellation using the default iPhone headphone. That is, to receive the external audio using the iPhone headphone Mic and make a phase shift of 180 degree. Finally, to play the inverted sound through default headphone speaker to cancel the external sound(Active noise cancellation).

Ref: http://electronics.howstuffworks.com/gadgets/audio-music/noise-canceling-headphone.htm

Can this be feasible with the iPhone App?

Answer

lericson picture lericson · Feb 11, 2015

With sound traveling at 343 m/s, assuming the distance between microphone and speaker is half a meter, you'd have about 1.5 milliseconds of processing time. Not impossible, but not a simple feat either, especially if you take into account the time it takes for the various components to actually start playback and for the recording to get to your app. I think this is also why most of the active noise canceling headphones require specialized hardware.

That said, I think you should definitely go for it. I'm very interested in this as well; I guess you would have to do a Fourier transform on the input and then phase shift it 180° like you said, then transform that back to the time domain, and finally play it to the user?