Follow this guide to replace the earpiece speaker assembly. This assembly contains a speaker, microphone, IR blaster, and ambient light sensor.
'''This guide involves removing the rear glass. Removing the rear glass destroys the adhesive holding it in place. Follow [https://www.ifixit.com/Guide/Samsung+Galaxy+S6+Rear+Glass+Adhesive+Replacement/44897|this guide] to reinstall the rear glass.'''
To reassemble your device, follow these instructions in reverse order.