nicschumann / fairly-fast-formants

A set of fast primitives for entirely client-side formant detection.
https://www.npmjs.com/package/fairly-fast-formants
0 stars 0 forks source link

Add Resampling #2

Open nicschumann opened 2 years ago

nicschumann commented 2 years ago

Not all browsers allow you to set the sample-rate on device. The main issue is Firefox, which vomits when you ask it to set the sample-rate of the AudioContext to anything other than the hardware sample-rate of the microphone. There are multiple options for dealing with this:

nicschumann commented 2 years ago

Leaning towards the 2nd bullet point above. It's the most compatible with the layout of the library, and keeps this thing "drag and drop": all functionality will still be accessible through a single setup call to .init() and a single usage call to .analyze(x : Float32Array).