charisma-ai / charisma-sdk-js

Charisma.ai SDK for Javascript (browser)
MIT License
12 stars 3 forks source link

fix[#30]: use the `sampleRate` of the created audio track #31

Closed bensalilijames closed 10 months ago

bensalilijames commented 10 months ago

Closes #30

The browser doesn't guarantee that it returns a track from getUserMedia matching the constraints that you've passed to it - it's a fuzzy kind of match. So it may give you back a track with an entirely different sampleRate to what you asked for.

If that's the case, now we actually use the correct sample rate (from the track) instead of what the user supplied.