Web Speech API

JavaScript


Lightning talk by Sebastian Schöld
sebastian.schold@netlight.com

Not yet a standard

... but it's getting there

Web Speech API


  • Speech recognition
  • Speech synthesis

Browser support?



How to use?

- in Chrome 25 + (current 30)
var recognition = new webkitSpeechRecognition();

// Some configuration
recognition.continuous = true;
recognition.interimResults = true;
recognition.lang = 'en-US';

// Event handlers
recognition.onstart = function() { ... }
recognition.onresult = function(event) { ... }
recognition.onerror = function(event) { ... }
recognition.onend = function() { ... }
 recognition.start();
  • start() activates the speech recognizer
  • onstart is called once it begins capturing audio
  • onresult is called for each set of results
  • onend is called when done





Try it out, there's support for over 32 languages

Thank you.

Lightning: Web Speech API

By Sebastian Schöld

Lightning: Web Speech API

This talk was held during Finn.no's Tech Day

  • 2,749