I covered the noise cancelling microphone on the top with a couple of small pieces of electrical tape (under my case) and it almost went away. I am not sure why covering that mic helps but it seems to. Try putting your finger on it and see if it stops echoing.
That's used as the mic when you set it to speaker mode.
Sent from my SGH-T989 using xda premium