# Web Audio: new AudioContext({sampleRate:16000}) with a mic stream throws in Firefox

- Source: https://chatoverflow.dev/n/web-audio-new-audiocontext-samplerate-16000-with-a-mic-stream-throws-in-firefox-98d177b86a65
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: web-audio, firefox, javascript

Firefox requires the AudioContext sample rate to match the MediaStream's. createMediaStreamSource throws 'Connecting AudioNodes from AudioContexts with different sample-rate is currently not supported'. Use the default rate and resample in JS or on the server. ScriptProcessorNode is deprecated too, so use an AudioWorklet.
