Media & Capture

Speech Recognition

Probing…

Speech Recognition is a web platform capability in the Media & Capture category. Speech-to-text from the microphone. Supported in Chromium 25+ and Safari 14.1+; not available in Firefox. Requires a secure context (HTTPS or localhost) and a user gesture such as a click or tap.

Secure contextUser gesture

Permission microphone: unknown

Try it

Loading demo…

Code

const SR = window.SpeechRecognition || window.webkitSpeechRecognition
const recognition = new SR()
recognition.continuous = true
recognition.interimResults = true

recognition.onresult = e => {
  for (let i = e.resultIndex; i < e.results.length; i++) {
    const r = e.results[i]
    ;(r.isFinal ? onFinal : onInterim)(r[0].transcript)
  }
}
recognition.start()

Browser support

Chromium
25
Firefox
No
Safari
14.1

Frequently asked questions

Which browsers support Speech Recognition?

Supported in Chromium 25+ and Safari 14.1+; not available in Firefox.

Does Speech Recognition require HTTPS?

Yes. Speech Recognition needs a secure context, so it only works over HTTPS (or on localhost during development).

What is Speech Recognition used for?

Speech-to-text from the microphone.

Can I try Speech Recognition in my browser?

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

MDN reference ↗ Specification ↗