Could it be that you are connected via bluetooth to something?
Maybe your phone is clad in a protective case that is blocking or partially covering the microphone(s)?
Any water exposure?
________________________________
If it were me, I remove any cases or covers and would try booting into Safe Mode and then running the Audio Diagnostic Test prior to trying to return it or take it to a store. The Audio Test will test your speakers and microphones for playback ability.
Safe Mode will run your phone with all 3rd party applications disabled, on a more clean configuration.
Ensure that Fast Boot is turned off in your Power Settings
Power the phone down and wait for it to be fully turned off for a minute or two
Power the phone back on
When you see the HTC Boot screen immediately press and hold down the 'volume down' hardware key on the right side of the phone. Hold it until the phone completes start up, and you see the words "Safe Mode" displayed in the lower left corner of your lock/home screen.
Then go into your phone dialer, like you are calling someone, and instead Dial *#*#3424#*#* (3424=DIAG) to access HTC's Diagnostic Test application (HTC Function Test v.44.60.10g).
Press 'Accept' when prompted. Within this menu select 'Audio Test', press the Run button, and then follow the on screen prompts. If you hear playback after recording from both microphones you can almost rule out a hardware failure.
To get out of Safe Mode simply power off and power on your phone as normal.