Published May 21, 2014 | Version v0.4.0

0.4.0

Authors/Creators

Description

Features
  • Native support detection #14

To detect native speech synthesis support use:

window.nativeSpeechSynthesisSupport(); // true, false

We use polyfill only when speech synthesis is not available. To initialize speech synthesis use:

var fallbackSpeechSynthesis = window.getSpeechSynthesis(); var fallbackSpeechSynthesisUtterance = window.getSpeechSynthesisUtterance(); var u = new fallbackSpeechSynthesisUtterance('Hello World'); u.lang = 'en-US'; u.volume = 1.0; u.rate = 1.0; u.onend = function(event) { console.log('Finished in ' + event.elapsedTime + ' seconds.'); }; fallbackSpeechSynthesis.speak(u);

Files

speech-synthesis-v0.4.0.zip

Files (13.5 kB)

Name Size
md5:5358743cf7b43dfd4910da505acd8c3b
13.5 kB Preview Download

Additional details