Noise Canceling Apple Earbuds

I attempted to create noise canceling headphones in software from Apple’s stock earbuds.

TLDR; It did not work #

The theory to this concept is simple, but relies on a prerequisite understanding of how noise canceling is implemented. I’m focusing on the challenge at a high-level, but explain what went wrong and offer some suggestions for how Apple can probably implement this.

This is a five step overview of how to implement noise cancellation.

  1. Start with a live ambient noise that will be captured by the ear.
  2. Capture the ambient audio noise with a microphone.
  3. Filter the audio signal to the desired band of the frequencey spectrum to cancel out. Assume you want to eliminate low rumblings of a server room or an airplane engine; You’ll need to run to remove the high frequencies from being processed.
  4. Invert the audio signal phase. To cancel out an audio signal, play the inverted signal simultaneously with the original audio signal. The process of playing the original audio and inverted audio simultaneously will cause the audio signals to cancel each other out and your ears won’t hear anything.
  5. Play the filtered-inverted audio signal though the earbuds at the exact same time live ambient noise is captured by your ear.

zenphones-howitworks.jpg

With the theory all taken care of, I built a simple mobile application which captures sound from the microphone, applies a high pass cut-off and low pass cut-off filter, inverts the phase and plays the audio back through the earphones. I call it Zenphones and here is what it looks like:

zenphones-screenshot.png

A simple 1-screen app that doesn’t work and here is why: Audio latency. If you look closely at the Input/Output plot of the application you can visually inspect the problem.

zenphones-latency.jpg

The latency between the input and processed output is enough to break the noise canceling and instead create a reverb effect. Noise canceling only works if both the normal and inverted audio signals are perfectly in sync. This means the latency gaps need to be completely removed in order for the app to work. The reason Bose headphones work well is because Bose processes the audio signal in hardware on your ear allowing Bose’s noise canceling headphones to play the inverted audio signal back as quickly as the ambient sound is received.

What might work #

Even though this didn’t succeed, I think that Apple could implement this with a few changes to hardware.

  1. Modify the stock earbuds - Now that Apple owns Beats By Dre, they should have some amazing audio engineers. Apple’s could embed a microphones in each ear to capture audio at the closes point to where sound enters the ear.
  2. Dedicated Audio Coprocessor - Currently, the algorithms for filtering and phase inversion run in software. The earbuds could send data directly to the device with a dedicated audio coprocessor to reduce time calculating a filtered and inverted audio signal.

If you want to play with the project yourself, I’ve open sourced the code under MIT license. Have fun.

Update #

Apple Insider Just announced that Apple researching wireless earphones with bone conduction noise cancelling tech

 
24
Kudos
 
24
Kudos

Now read this

The Sovereign Ratio

Measuring the New Power Metric # Have you ever considered what truly determines your ability to influence the world around you? Beyond wealth and status, there lies a concept poised to redefine personal empowerment: the Sovereign Ratio.... Continue →