【问题标题】:where to use noise suppressor?在哪里使用噪声抑制器?
【发布时间】:2019-07-22 09:12:14
【问题描述】:

我正在开发我的第一个应用程序,它将使用手机的麦克风录制音频。我想应用一些声音预处理算法,如#NoiseSuppressor,但不知道在哪里使用它?是在录制过程中还是在录制完成后?任何人都可以抽出一些宝贵的时间来帮助我。任何帮助将不胜感激。

【问题讨论】:

标签: android audio noise-reduction


【解决方案1】:

请注意,您只能使用 AudioTrack 和 AudioRecord 来实时使用噪声消除,而不能使用 MediaRecorder。要使用噪声抑制器:

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");
  }
}

https://twigstechtips.blogspot.com/2013/07/android-enable-noise-cancellation-in.html 此处有一个较旧且更底层方法的示例

【讨论】:

    猜你喜欢
    • 2013-08-22
    • 1970-01-01
    • 2011-01-21
    • 2016-01-12
    • 1970-01-01
    • 2011-11-10
    • 2017-09-26
    • 2020-02-16
    • 2012-04-12
    相关资源
    最近更新 更多