This is based on Liveeffect sample project by Google and uses AAudio library for audio
It uses NLMS filters to estimate feedback path between speaker and microphone, and uses this estimate to remove just the feedback part from the incoming (signal+feedback) audio coming in through the mic. Earphone is deliberately kept close to the mic in to ensure feedback howling occurs. The same audio signal goes out to both the left and right earbuds, so I can generate feedback noise using one of the earbuds while listening to whatever audio the phone is outputting on the other one. The hardware setup looks something like this:
The phone volume has been slightly reduced from maximum level, since I couldn't get this program to work at all for max volume.
The actual feedback cancellation (FBC) part starts at around 0:22 sec and everything before that is just preparation so if you'd like to skip it just click here:
The video has sections of loud feedback howling so either do not use headsets or turn down the volume.
The app starts off with FBC turned on but the demo goes back and forth between FBC being toggled on and off. Speech is being played nearby the smartphone so you can hear what speech sounds like with and without the FBC.
Any feedback on the demo will be appreciated. I especially want to discuss the causes of the "echoey" effect which seems to go away if I bypass the FBC process. I am wondering if other feedback cancellation methods have this, if this is something inherent to the NLMS process, or if I am doing something wrong.
It uses NLMS filters to estimate feedback path between speaker and microphone, and uses this estimate to remove just the feedback part from the incoming (signal+feedback) audio coming in through the mic. Earphone is deliberately kept close to the mic in to ensure feedback howling occurs. The same audio signal goes out to both the left and right earbuds, so I can generate feedback noise using one of the earbuds while listening to whatever audio the phone is outputting on the other one. The hardware setup looks something like this:

The phone volume has been slightly reduced from maximum level, since I couldn't get this program to work at all for max volume.
!!! Loud noise: reduce volume !!!
I've uploaded a demo of the app here:The video has sections of loud feedback howling so either do not use headsets or turn down the volume.
The app starts off with FBC turned on but the demo goes back and forth between FBC being toggled on and off. Speech is being played nearby the smartphone so you can hear what speech sounds like with and without the FBC.
Any feedback on the demo will be appreciated. I especially want to discuss the causes of the "echoey" effect which seems to go away if I bypass the FBC process. I am wondering if other feedback cancellation methods have this, if this is something inherent to the NLMS process, or if I am doing something wrong.