4

I'm trying to implement a similar functionality like was added to Voice Memos in iOS 14. As far as I know it reduces background noise and removes echo.

The overall goal is to make voice recording sound better by presumably cutting noise, removing echo, slightly increasing bass and normalizing the result.

I've tried using 2 EQs: ~80Hz high-pass and ~1050Hz low-pass (assuming those are the ~ranges for human voice), but it does virtually nothing. I'm very new to audio processing, so I have nearly no idea what am I doing wrong.

eq.bypass = false

let cutLower = eq.bands[0]
cutLower.filterType = .highPass
cutLower.frequency = 82
cutLower.bypass = false
cutLower.gain = 3
cutLower.bandwidth = 1
    
let cutHigher = eq.bands[1]
cutHigher.bypass = false
cutHigher.filterType = .lowPass
cutHigher.frequency = 1047
cutHigher.gain = 3
cutHigher.bandwidth = 1

Checked all the filters/effects available in the engine, but couldn't find anything remotely appropriate.

I also looked into AudioKit, but since I need to do manual rendering (apply effects without playing the recording) and all the docs on the topic seem outdated, I went with plain AVAudioEngine.

bitemybyte
  • 971
  • 1
  • 10
  • 24
  • 3
    Hi, I think a better approach would be to try the noise reduction as the documentation says in the Accelerate library, by performing a DCT and removing frequencies below a threshold. I don't know how the Voice Memos app do it live. maybe they use installTap and do a DCT over each buffer. https://developer.apple.com/documentation/accelerate/signal_extraction_from_noise https://developer.apple.com/documentation/avfaudio/avaudionode/1387122-installtap – Miguel de Sousa Apr 01 '21 at 15:16
  • Now that's an interesting approach. Would be great to see that done in a sample. – seth Aug 12 '21 at 20:56
  • What I can't find is an `AudioUnit` that implements this, you'd think it's an obvious thing that should exist. – Robert Atkins May 06 '22 at 12:26

0 Answers0