I am trying to use PortAudio.jl to build a system that immediately plays back audio from a microphone to the speakers. The long term plan is to be able to add funny effects and things like pitch correction. The idea is to make this run on the Raspberry Pi and use it as a system for my daughter to sing along with music videos.
It turns out to be very simple with PortAudio to just feed the microphone output to the speakers:
using PortAudio stream = PortAudioStream(2, 2) write(stream, stream)
However, as one might expect, depending on the buffer size this gives either horrible feedback or echo. Is there a standard algorithm to cancel these effects that would be easy to implement using what’s available in Julia?