简体   繁体   中英

where to use noise suppressor?

i am working on my first app which will record audio using mic of cellphone. I want to apply some sound pre-processing algo like #NoiseSuppressor but don't know where to use it? Either while recording or after recording is done? Could any one please spare some precious time to help me. Any help will be highly appreciated.

Please note that you can use noise canselation in real time only with AudioTrack and AudioRecord, but not with MediaRecorder. To use a noise suppressor:

public void enableNoiseSuppressor() {
  if (NoiseSuppressor.isAvailable() && noiseSuppressor == null) {
    noiseSuppressor = NoiseSuppressor.create(microphoneId);
    noiseSuppressor.setEnabled(true);
    Log.i(TAG, "NoiseSuppressor enabled");
  } else {
    Log.e(TAG, "This device don't support NoiseSuppressor");
  }
}

There is an example of an older and more low level approach here https://twigstechtips.blogspot.com/2013/07/android-enable-noise-cancellation-in.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM