- Slides for what is the role of echo in WebRTC; and solutions!
- Download PDF for What is Echo?
- 44.1 kHz and non-44.1 kHz sample rate mismatches cause echo
- The "ambient noise reduction" which can be enabled on the built-in mic on Mac appears to cause a very small amount of echo
- Ensure both capture and render devices are set to either 44.1 or 48 kHz. You can do this through the "Audio MIDI Setup" application
- Disable "ambient noise reduction"
High volume can produce sound noise on some audio devices. The value may not be significant if audio device volume is controlled externally.
HTMLAudioElement.volume = 0.9; HTMLAudioElement.play();
GainNode is a simple element that lets us control the volume of the audio that’s coming into to it.
var context = new webkitAudioContext(), var sineWave = context.createOscillator(); // Declare gain node var gainNode = context.createGainNode(); // Connect sine wave to gain node sineWave.connect(gainNode); // Connect gain node to speakers gainNode.connect(context.destination); // Play sine wave sineWave.noteOn(0); gainNode.gain.value = 0.9;
Try demo locally to control volume using GainNode.
- If you're newcomer, newbie or beginner; you're suggested to try RTCMultiConnection.js or DataChannel.js libraries.