The primary phone mic could be blocked by debris (like lint), so inspect it closely and consider using a fine-tipped needle or pin to gently clean t out. Also, if you have a case, make sure it isn't blocking the primary mic as well as the secondary noise-cancelling mic (which is near the top of the phone).
If the problem persists, then the primary phone mic may just be faulty.