This seems to be a bug in Android AAC-based audio encoders. The only solution I found is to use an AMR audio encoder. Unfortunately, AMR_WB does not sound as good as a human voice.
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_WB);
The only other option, as far as I can tell, is to use AudioRecord, which is much more complicated.
source share