Title: AudioRecord AMR
Tags: android;mediarecorder;audiorecord;amr
Question: I need to get priodic notifications from the MIC and get RMS of the sampled amplitudes, i am currently doing it with an AudioRecord that saves the sound on WAV format (like here). but this turns out very uneffective file size wise, is it possible to save the pcm data to file in amr format?
references would be greatly appriciated...
BTW, i tried to do it with MediaRecorder, but getMaxAmplitude doesnt seem to work as expected when it is being queried less then about 32 times a second (returns alot of zeros even in a noisy room). is there a way to encounter this? or is there a way to get priodic notifications from the AudioRecord and let MediaRecorder save the amr file simultanously?
any other suggestions?
Comment: The `AudioRecord`class does not save the recorded data to disk; it just gives you buffered PCM audio in an array that you supply, and which you can "throw away" after you've analyzed it. Or do you need to save the recorded audio to disk? Using AMR encoding seems like a bad idea, since it will compress the audio a _lot_ (i.e. you're losing a lot of information).

Comment: @Micheal yes i do need to save the audio to disk, and i dont care about the quality, i just want a reasonable recording in a reasonable size on disk...



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2013:00:09/17/13', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<android><mediarecorder><audiorecord><amr>', 'Title': 'AudioRecord AMR', 'ViewCount': 837, 'id': 18846079, 'user_AboutMe': '<p>What can i say i like to code</p>\n', 'user_AccountId': 479245.0, 'user_DisplayName': 'Ofek Ron', 'user_Reputation': 8101.0, 'user_Views': 1116.0, 'user_id': 891814.0}}