Issue metadata
Sign in to add a comment
|
Can't disable preprocessing of microphone with getUserMedia on Android (Samsung S9)
Reported by
wyllie...@gmail.com,
Jul 30
|
||||||||||||||||||||||
Issue descriptionChrome Version : 67.0.3396.87 URLs (if applicable) : Similar type of problem - https://stackoverflow.com/questions/31426551/get-consistent-audio-quality-with-getusermedia-using-different-browsers The provided mp3 file was recorded using the ASR Android app https://play.google.com/store/apps/details?id=com.nll.asr&hl=en_GB Recorder.js online demo https://addpipe.com/simple-recorderjs-demo/ OS version : Android 8.0.0, SM-G960F (Samsung Galaxy S9) Network (such as Cable/DSL/Dial up etc): Audio/Video format (if applicable): Special chrome flags (if applicable): Behavior in Safari (if known): N/A Behavior in Firefox (if known): N/A Video issue, Audio issue, both, neither? Audio issue only Flash or HTML5? <right-clicking most players will either reveal some text with “Flash”; otherwise likely HTML5> HTML5 If the browser or renderer crashed (“Aw, Snap”), please add any crash IDs from chrome://crashes (possibly after enabling crash reporting per http://support.google.com/chrome/bin/answer.py?hl=en&answer=96817) What steps will reproduce the problem? (1) In Javascript open a MediaStream using navigator.mediaDevices.getUserMedia(), with the constraints set such that echoCancellation, autoGainControl, and noiseSuppression are all false, and deviceId is set to the deviceId of the device with label "Speakerphone", which is supposed to be optimised for picking up background noise. (2) Record and save the audio from this MediaStream, as a standard WAV file. What is the expected result? The recorded audio should be the raw output from the microphone; completely unprocessed. What is the actual result? The recorded audio is distorted and filtered; higher frequency content is missing and lower amplitude portions of the signal have been replaced with absolute silence. Note also that the amplitude of the recording as a whole is very low - this may be directly what is causing the issue as chrome seems to replace low amplitude regions with zeroes. Any additional information (anything else which may help us debug the issue)? I have attached some recordings to give a clearer picture of what is going on. The original recording is an audio file of some instrumental music. This original recording was played through speakers, and the result recorded on the Galaxy S9 phone, for testing purposes. One recording is of the unprocessed microphone data, recorded using the native Android ASR app. The audio quality is somewhat poor, as expected, but still intelligible. The others were recorded using the Web Audio API, with the getUserMedia device as specified in the name of each file. Both the "default" and "speakerphone" devices give very quiet audio that drops to silence after a few seconds. The "Headset Earpiece" labelled device continues to record, albeit distorted and with regions of silence, for the duration of the snippet. I am unsure whether this truly is a bug, as opposed to just the raw samples being unaccessible with getUserMedia (in which case this should presumably be a feature request). Essentially the issue is; for Chrome on Android how can the raw microphone data be accessed, given that Chrome seems to apply its own filters to the data, and there is either no way to disable this, or the noiseSuppression constraints / choosing Speakerphone device which are meant to give unfiltered data, are bugged and do not. Please attach the HTML5/JavaScript code or audio/video files as well as screenshot and/or videos (if applicable) Attached: - Audio recordings as mentioned above - Some sample code used to open getUserMedia, with the relevant constraints - A screenshot of a spectrogram. On the top, an instrumental performance recorded with a microphone on PC, using the Recorder.js online demo. On the bottom, a spectrogram of the exact same performance recorded on the S9. The missing higher frequency energy and regions of zeros can clearly be seen. The audio sounded notably muffled in this test. Note that when recording under the same conditions using a native Android voice recorder, the quality is comparable to the microphone / PC, and far clearer than the getUserMedia based recording.
,
Aug 1
Also see this thread for very relevant discussion. https://github.com/w3c/mediacapture-main/issues/457
,
Dec 13
Same issues as discussed in https://bugs.chromium.org/p/chromium/issues/detail?id=866390 Has now been fixed
,
Dec 17
It appears the problem has been fixed as part of 866390. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by swarnasree.mukkala@chromium.org
, Jul 31