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.