I tried to make a voice capture application that is captured only when there is noise. Therefore, I used the getMaxAmplitude () method from the Media Recorder class. And here is my idea and work: I started the service that used the MediaRecorder object to record sound from the emulator’s microphone, then I have a stream that checks the getMaxAmplitude () value of this object, if it goes beyond a certain level, I start another recording using a new object from MediaRecorder for a certain period of time, and then save it. If after starting the service of my application there is, for example, “3 noises”, it should save 4 audio files, including the main one, which is used to control the amplitude level.
BUT I noticed a problem, that is, the android microphone allows only one media recorder at a time. So is there any other way to do this?
source share