Media & Capture

Web Audio

Probing…

Web Audio is a web platform capability in the Media & Capture category. Synthesize, process and analyze audio in real time. Supported in Chromium 35+, Firefox 25+, and Safari 14.1+. Requires a user gesture such as a click or tap.

User gesture

Try it

Loading demo…

Code

const ctx = new AudioContext()
const osc = ctx.createOscillator()
const analyser = ctx.createAnalyser()

osc.type = 'sawtooth'
osc.frequency.value = 440
osc.connect(analyser).connect(ctx.destination)
osc.start()

// Visualise
analyser.getByteTimeDomainData(buffer)

Browser support

Chromium
35
Firefox
25
Safari
14.1

Frequently asked questions

Which browsers support Web Audio?

Supported in Chromium 35+, Firefox 25+, and Safari 14.1+.

Does Web Audio require HTTPS?

No. Web Audio works without a secure context, though serving your site over HTTPS is always recommended.

What is Web Audio used for?

Synthesize, process and analyze audio in real time.

Can I try Web Audio in my browser?

Yes. shwcs.net runs a live Web Audio demo that probes your current browser and lets you try the API. Everything runs locally — nothing is sent anywhere.

MDN reference ↗ Specification ↗