Bug 192932 - Can not disable audio processing (lowpass)
Summary: Can not disable audio processing (lowpass)
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: Safari 12
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-20 08:44 PST by Franz Bender
Modified: 2019-10-24 09:26 PDT (History)
5 users (show)

See Also:


Attachments
Page 1: Chrome picks up high frequency audio; Page 2: Safari doesn't pick up high frequencies (181.13 KB, application/pdf)
2018-12-20 08:44 PST, Franz Bender
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Bender 2018-12-20 08:44:59 PST
Created attachment 357815 [details]
Page 1: Chrome picks up high frequency audio; Page 2: Safari doesn't pick up high frequencies

Problem:
There is no way to disable the pre-preprocessing of audio (coming from the microphone). Even with the 'echoCancellation'-Flag set to false high frequencies get filtered out.

What did I try to do:
I'm trying to analyze audio coming from the microphone:

let stream = await navigator.mediaDevices.getUserMedia({
    audio: {
        optional: [
            {autoGainControl: false},
            {noiseSuppression: false},
            {echoCancellation: false}
        ]
    },
    video: false
});
let inputSource = this.audioCtx.createMediaStreamSource(stream);

I wrote a script implementing an algorithm which detects certain frequencies (called Goertzel algorithm). I noticed that it only works for low frequencies (in the range of human hearing). In Chrome however it did work so I assume that there is still some kind of audio processing going even though I tried to disable it.

In the attached PDF-File you can see two screenshots of exactly the same page. The left box is a plot of the raw audio data (512 Samples) and on the right is an indicator that shows the level of 18000Hz. I set my iPad up to play a 18000Hz signal at high volume. Chrome (page 1) processes the audio correctly. Safari on the other hand doesn't pick up those high frequencies.
Comment 1 Franz Bender 2018-12-20 08:47:07 PST
I forgot: This behavior can be observed using desktop Safari (Version 12.0 (14606.1.36.1.9)) as well as mobile Safari (iOS 12.1 (16B92))
Comment 2 Radar WebKit Bug Importer 2018-12-20 16:09:23 PST
<rdar://problem/46886789>
Comment 3 Ryan Clough 2019-10-24 09:26:10 PDT
Can confirm, see my comment in https://bugs.webkit.org/show_bug.cgi?id=179411