Microphone not working properly

Well if it works fine using data over a mobile service provider you are using a different radio system in the phone.

If it doesn’t work well with the wifi then it must be one of a) the signal provided b) a faulty the wifi radio in the phone c) some physical connection between parts ~ which I doubt or d) poor software interface interface between the wifi chip and the audio hardware system on the phone.

If audio works using mobile transmission then you can rule out the actual audio hardware.