10

Can anyone point me in the right direction on how I would minimize ambient noise while recording someone speaking using the iPhone SDK Core Audio? I'm guessing a band-pass filter that eliminates any frequencies above and below the human vocal range might work. I have no idea how I would implement band filters on audio in the SDK though. The optimum solution would be one that eliminates the noise from the stream before it is written to memory/disk.

Cœur
  • 37,241
  • 25
  • 195
  • 267
memmons
  • 40,222
  • 21
  • 149
  • 183
  • 1
    Noise, by its random nature, is inherently a difficult thing to remove from audio or any other signal. While you can remove the apparent noise in a recording, it will affect the signal in unpredictable ways. Consider all the archivists and recording engineers and their constant battle with noise. – lucius Mar 01 '10 at 01:34
  • Have you been able to reduce background noise while recording?if so please give some ideas. – Warrior Oct 30 '10 at 04:33

2 Answers2

8

You would need to implement an adaptive filter and a voice activity detector. In periods where there is no speech you would collect ambient noise and use this to drive the adaptive filter.

Paul R
  • 208,748
  • 37
  • 389
  • 560
  • 1
    R-->can you provide me any codes for implementing the adaptive filter algorithm? – Warrior Nov 15 '10 at 07:40
  • 1
    @Warrior: adaptive filters are non-trivial to implement - I suggest you read a good book on the subject, e.g . http://www.amazon.com/Adaptive-Filter-Theory-Simon-Haykin/dp/0130901261 or failing that at least Google for LMS etc and learn some of the theory before trying an implementation – Paul R Nov 15 '10 at 07:59
2

Have a search for "spectral subtraction" which a technique of analyzing a sample of what you're calling background noise, and then subtracting it from the the regular signal. Yes, you will always get some artifacts. It's a tradeoff.

Alex
  • 21
  • 1