keyboard_backspace wifi_off

Speech recognition

This feature is not (yet) supported on your device

This feature works in Safari on iOS but not (yet) for installed web apps.

Speech recognition is part of the Web Speech API and provides the ability to recognize voice context from an audio input.

Demo

Click "Start recognition" and speak into your microphone to start the speech recognition. Click "Stop recognition" to stop the speech recognition. You should see the results of the speech recognition. Check "Show interim results" to see the interim results of the speech recognition.

To record an audio track to recognize speech from, click "Start recording" to start recording audio from your microphone. Click "Stop recording" to stop recording audio and then the recognized speech will appear.

When available for your device, you can download language models for on-device speech recognition. After downloading, you can go offline and use the downloaded language models for on-device speech recognition without an internet connection.

const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; const language = 'en-US'; if(await SpeechRecognition.available({ langs: [language], processLocally: true }) === 'downloadable') { await SpeechRecognition.install({ langs: [language], processLocally: true }); } const recognition = new SpeechRecognition(); recognition.lang = language; recognition.processLocally = true; recognition.addEventListener('result', event => { console.log(event.results[0][0].transcript); }); recognition.start();

Documentation

SpeechRecognition API on MDN

Browser support

SpeechRecognition API on caniuse.com

Contrary to what caniuse.com states, the SpeechRecognition API is supported in PWAs added to the Home Screen on iOS.

What PWA Can Do Today A showcase of what is possible with Progressive Web Apps today

You are offline, external links cannot be opened.