Simple fix and I have repaired it a hundred times. Pretty sure the problem is that the earpiece speaker isn't sitting properly in its slot in the screen. You need to remove the bracket that holds the earpiece speaker, proximity sensor, rear facing camera. Pull the camera back and remove the earpiece speaker. Make sure that the opening isn't clogged with debris by holding it up and looking through that very small earpiece speaker opening at a light source. It should be a little dim but definitely should be able to see light through it. If this is an issue, use alcohol and Q-tips and clean that sucker. If that isn't the problem, put the speaker back in place making sure you fit the snout of the speaker nicely in the rubber grommet. One way to make sure it's where it needs to be is this...when it's where it needs to be it won't move around when you try to move it laterally.
Put everything back together and test it out. If that doesn't fix it, you need to replace the earpiece speaker.
Hope this helps.