I had issue with earpiece speaker ,when i was awaiting for earpiece speaker replacement part time to time i used to run "Speaker dry" app and the speaker worked for day or two , silly workaround but maybe it also helps with microphone.
But you definitely need to lookup for replacement part if possible.