If you check the sources on Android, it will record in AMR-WB
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_WB);
recorder.setOutputFile(temp.getAbsolutePath());
API Google AMR-WB, .
, AMR-WB 3GPP, 3GPP, :
private static byte[] AMR_MAGIC_HEADER = {0x23, 0x21, 0x41, 0x4d, 0x52, 0x0a};
public byte[] convert3gpDataToAmr(byte[] data) {
if (data == null) {
return null;
}
ByteArrayInputStream bis = new ByteArrayInputStream(data);
FileTypeBox ftypHeader = new FileTypeBox(bis);
MediaDataBox mdatHeader = new MediaDataBox(bis);
int rawAmrDataLength = mdatHeader.getDataLength();
int fullAmrDataLength = AMR_MAGIC_HEADER.length + rawAmrDataLength;
byte[] amrData = new byte[fullAmrDataLength];
System.arraycopy(AMR_MAGIC_HEADER, 0, amrData, 0, AMR_MAGIC_HEADER.length);
bis.read(amrData, AMR_MAGIC_HEADER.length, rawAmrDataLength);
return amrData;
}
, AMR-WB , API, .