hcilab / BreathingSonarJS

A Javascript web-tool that monitors breathing using high-frequency sonar
1 stars 0 forks source link

Test performance implications of low-level audio settings in Web Audio #1

Open aarontabor opened 4 years ago

aarontabor commented 4 years ago

Overview

The Web Audio library used to create and capture the sonar signal in this project allows us to specify several low-level audio capture settings related background noise cancellation, especially in mobile devices like phones and tablets. For example:

audio: {
        'autoGainControl': false,
        'echoCancellation': false,
        'noiseSuppression': false
}

I initially found that disabling some of these settings allowed my phone to detect the sonar signal, but I've since found that this degrades performance with my studio mic. I'm not completely sure which specific setting is the culprit, so I've reverted all of these settings in 5bca1e26d7c92ea1bef497a9638fad579e1a3acd.

Tasks

aarontabor commented 4 years ago

My suspicion is that disabling 'echoCancellation' is probably creating feedback that distorts the sonar signal - we don't hear the feedback because the captured audio isn't played-back.