Very unlikely to be a hardware problem. Usually it's a user error e.g. not holding the phone close enough to your mouth or using the phone in very loud environments.
Try using the phone normally i.e. not in speaker phone mode where performance is worse and you annoy everyone within earshot. You can also try disabling noise reduction in the settings menu. Infrequently you may have water, dirt or your finger (when you hold the phone) obscuring the microphone hole on the bottom of the phone.
It's also possible to tweak the mic volume in the service menu /audio submenu. A forum search will explain the details if you wish to try that.