Appropriate sound capture and noise reduction

In my Android application, I need to record user speech from a microphone, and then transfer it to the server. I am currently using the MediaRecorder class. However, this does not satisfy my needs, because I want to make a glowing effect based on the current volume of the input sound, so I need an AudioStream or something like that, I think. I am currently using the following:

  this.recorder = new MediaRecorder(); this.recorder.setAudioSource(MediaRecorder.AudioSource.MIC); this.recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); this.recorder.setOutputFile(FILENAME); 

I write using API level 7, so I don't see any other AudioEncoders, but the AMR Narrow Band. Perhaps this is the reason for the terrible noise that I hear in my recordings.

The second problem I encountered is poor sound quality, noise, so I want to cancel it (cancel, suppress), because it is really terrible, especially on my non-American Chinese tablet. This should be on the server side, because, as far as I know, requiers have a lot of resources, and not all modern gadgets (especially noname Chinese tablets) can do this as quickly as possible. I am free to choose which platform to use on the server, so it can be ASP.NET, PHP, JSP or something else that helps me improve the sound. Speaking of ASP.NET, I came across a library called NAudio, maybe this can help me in some way. I know that there is no noise reduction solution in the library, but I have found some examples of using FFT and autocorrelation, so this can help.
Honestly, I have never worked with sound before, and I don’t know where to start. I knew a lot about noise reduction methods, code examples, and found nothing. You guys are my last hope. Thanks in advance.

+1
source share
3 answers

Check out this article .

In short, it uses MediaRecorder.AudioSource.VOICE_RECOGNITION instead of AudioSource.MIC , which gave me really good results and noise in the background has been greatly reduced.

The great thing about this solution is that it can be used with both the AudioRecord class and MediaRecorder.

+2
source

You can use the AudioRecord class to record sound. This allows you to record raw audio, i.e. You are not limited to a narrow band, and you can also measure volume.

+1
source

Many smartphones have two microphones, one of which is a MIC , the other is a video camera called CAMCORDER . You can get data from both of them to reduce noise. There are many articles about noise reduction with multiple microphones.

Link: http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html

https://www.google.com/search?q=noise+reduction+algorithm+with+two+mic

0
source

Source: https://habr.com/ru/post/1243298/


All Articles