简体   繁体   English

如何消除回声

[英]How to remove echo

I am working on app which do live stream between two android devices. 我正在开发在两个Android设备之间进行实时流传输的应用程序。 I have got pretty got results like connectivity, video stream. 我得到了诸如连接性,视频流之类的漂亮结果。 But i am not happy with sound qualtiy there is so echo and noise in sound. 但是我对声音质量不满意,声音中有回声和噪音。 This is how i am using audio track 这就是我使用音轨的方式

localMS = factory.createLocalMediaStream("ARDAMS");
          if(pcParams.videoCallEnabled)
          {
              MediaConstraints videoConstraints = new MediaConstraints();
              videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("maxHeight", height));
              videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("maxWidth",  width));
              videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("maxFrameRate", Integer.toString(pcParams.videoFps)));
              videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("minFrameRate", Integer.toString(pcParams.videoFps)));

              videoSource = factory.createVideoSource(getVideoCapturer(), videoConstraints);
              localMS.addTrack(factory.createVideoTrack("ARDAMSv0", videoSource));
          }

          AudioSource audioSource = factory.createAudioSource(new MediaConstraints());
          localMS.addTrack(factory.createAudioTrack("ARDAMSa0", audioSource));

          mListener.onLocalStream(localMS);

So i am looking for way to remove echo and noise cancellation. 所以我正在寻找消除回声和噪声消除的方法。 any help and guidance will be very much appreciated. 任何帮助和指导将不胜感激。

Possible solutions to solve sound quality problems: 解决声音质量问题的可能解决方案:

  • Reduce video resolution to allow more bandwidth for audio 降低视频分辨率以增加音频带宽
  • Don't run two clients in the same physical room (sound from the speaker on one computer enters the microphone of the other computer) 不要在同一个物理房间中同时运行两个客户端(一台计算机上的扬声器的声音进入另一台计算机的麦克风)
  • Reduce the speaker volume. 降低扬声器音量。
  • Use a headset. 使用耳机。
  • Use a conference microphone/speaker with built-in noise cancelling. 使用具有内置噪音消除功能的会议麦克风/扬声器。
  • Android implement noise cancelling API ( http://developer.android.com/reference/android/media/audiofx/NoiseSuppressor.html ) Android实现降噪API( http://developer.android.com/reference/android/media/audiofx/NoiseSuppressor.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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