Chosen Solution
I recently replaced the battery on my iPhone 6; after completion everything was working as normal expect for the phone earpiece speaker. I tried reconneting the cables inside and removing and refitting the speaker but no luck. There is no sound coming from the speaker at all and I am forced to use headphones or speakerphone. What are all the possible causes/fixes?
You may have torn the forehead flex when you changed the battery. Did you remove the screen or did you leave it attached while you did the repair. the other possibility is that the connector was damaged, either on the logic board or on the flex. I would inspect those carefully under magnification.
That is exactly what happed to mine after I changed out the battery . I tried replacing the screen and installed a new flex cable camera assembly and tried two different earpiece speakers with no luck but the loud speaker would work fine