WebAudio file stream+getUserMedia sound quality and low-latency audio input Chrome 61

758 views
Skip to first unread message

Айдар Габдуллин

unread,
Sep 11, 2017, 6:19:29 AM9/11/17
to discuss-webrtc
Hello, dear community members.

I have several problems with audio quality on a remote end when mixing WebAudio and getUserMedia streams.
Let me describe a usage scenario. A drum beat is being played using WebAudio API from a file using following method invocation sequence: (createMediaElementSource(mediaElement) -> audioContext.createMediaStreamDestination -> RTCPeerConnection.addTrack). The same peerconnection also contains the mediaTrack captured from an electric guitar. Playing separately the quality is OK, but once both tracks start to play together the quality becomes really bad. Glitches, clicks etc occur. Additionally, drum beat becomes arrhythmic. Is there any possibility to debug the reason of that and improve the quality? Is there a chance that mediaElement.captureStream will fix that once it occurs in Chrome stable?

Second problem is an input latency. I use external usb-audio device and there is a slight delay which makes concurrent listening and playing almost impossible. Generally it can be solved on Windows using ASIO4ALL. But it seems like Chrome can not access ASIO drivers. So the question is how to make Chrome work with ASIO4ALL and is there any possibility to reduce the input latency on Windows and other platforms?

Maybe some of you have solved that issues and may share the relevant experience? it would be much appreciated.

ben.ra...@cosmosoftware.io

unread,
Oct 9, 2017, 5:37:04 AM10/9/17
to discuss-webrtc
Hi,

About the first part, that issue is due certainly to the audio processing (AEC). To disable it with Chrome, you have to set echo cancellation to false on gUM
Example:
var mediaConstraints = {
    audio: {
        mandatory: {
            echoCancellation: false
        }
    }
}
      

Айдар Габдуллин

unread,
Oct 12, 2017, 3:10:00 PM10/12/17
to discuss-webrtc
Thanks for an answer! I tried turning off AEC and it seemed to improve quality significantly. So the main issue now is an input latency. I also describe problem here: https://groups.google.com/forum/#!topic/discuss-webrtc/DcNFYCzmXCc

понедельник, 9 октября 2017 г., 12:37:04 UTC+3 пользователь ben.ra...@cosmosoftware.io написал:
Reply all
Reply to author
Forward
0 new messages